Skip to content

Commit

Permalink
[CELEBORN-1499] Bump Ratis version from 3.0.1 to 3.1.0
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

Bump Ratis version from 3.0.1 to 3.1.0. Meanwhile, remove `CelebornStateMachineStorage` with the release of apache/ratis#1111.

### Why are the changes needed?

Bump Ratis version from 3.0.1 to 3.1.0. Ratis has released v3.1.0, of which release note refers to [3.1.0](https://ratis.apache.org/post/3.1.0.html). The 3.1.0 version is a minor release with multiple improvements and bugfixes including [[RATIS-2111] Reinitialize should load the latest snapshot](https://issues.apache.org/jira/browse/RATIS-2111). See the [changes between 3.0.1 and 3.1.0](apache/ratis@ratis-3.0.1...ratis-3.1.0) releases.

Follow up #2547.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

`MasterStateMachineSuiteJ#testInstallSnapshot`

Closes #2610 from SteNicholas/CELEBORN-1499.

Authored-by: SteNicholas <[email protected]>
Signed-off-by: Shuang <[email protected]>
  • Loading branch information
SteNicholas authored and RexXiong committed Jul 11, 2024
1 parent d698a69 commit adbef7b
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 229 deletions.
3 changes: 0 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,3 @@ Remote Shuffle Service for Flink
./client-flink/common/src/main/java/org/apache/celeborn/plugin/flink/buffer/DataBuffer.java
./client-flink/common/src/main/java/org/apache/celeborn/plugin/flink/buffer/SortBasedDataBuffer.java
./client-flink/common/src/main/java/org/apache/celeborn/plugin/flink/buffer/TransferBufferPool.java

Apache Ratis
./master/src/main/java/org/apache/celeborn/service/deploy/master/clustermeta/ha/CelebornStateMachineStorage.java
18 changes: 9 additions & 9 deletions dev/deps/dependencies-server
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ netty-transport/4.1.109.Final//netty-transport-4.1.109.Final.jar
osgi-resource-locator/1.0.3//osgi-resource-locator-1.0.3.jar
paranamer/2.8//paranamer-2.8.jar
protobuf-java/3.21.7//protobuf-java-3.21.7.jar
ratis-client/3.0.1//ratis-client-3.0.1.jar
ratis-common/3.0.1//ratis-common-3.0.1.jar
ratis-grpc/3.0.1//ratis-grpc-3.0.1.jar
ratis-metrics-default/3.0.1/ratis-metrics-default-3.0.1.jar
ratis-netty/3.0.1//ratis-netty-3.0.1.jar
ratis-proto/3.0.1//ratis-proto-3.0.1.jar
ratis-server-api/3.0.1//ratis-server-api-3.0.1.jar
ratis-server/3.0.1//ratis-server-3.0.1.jar
ratis-shell/3.0.1//ratis-shell-3.0.1.jar
ratis-client/3.1.0//ratis-client-3.1.0.jar
ratis-common/3.1.0//ratis-common-3.1.0.jar
ratis-grpc/3.1.0//ratis-grpc-3.1.0.jar
ratis-metrics-default/3.1.0/ratis-metrics-default-3.1.0.jar
ratis-netty/3.1.0//ratis-netty-3.1.0.jar
ratis-proto/3.1.0//ratis-proto-3.1.0.jar
ratis-server-api/3.1.0//ratis-server-api-3.1.0.jar
ratis-server/3.1.0//ratis-server-3.1.0.jar
ratis-shell/3.1.0//ratis-shell-3.1.0.jar
ratis-thirdparty-misc/1.0.5//ratis-thirdparty-misc-1.0.5.jar
reflections/0.10.2//reflections-0.10.2.jar
rocksdbjni/8.11.3//rocksdbjni-8.11.3.jar
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import com.google.protobuf.InvalidProtocolBufferException;
import org.apache.ratis.protocol.Message;
import org.apache.ratis.statemachine.impl.SimpleStateMachineStorage;
import org.apache.ratis.thirdparty.com.google.protobuf.ByteString;

import org.apache.celeborn.common.client.MasterNotLeaderException;
Expand Down Expand Up @@ -123,8 +124,7 @@ public static Message convertResponseToMessage(ResourceProtos.ResourceResponse r
* @return the temporary snapshot file
* @throws IOException if error occurred while creating the snapshot file
*/
public static File createTempSnapshotFile(CelebornStateMachineStorage storage)
throws IOException {
public static File createTempSnapshotFile(SimpleStateMachineStorage storage) throws IOException {
File tempDir = storage.getTmpDir();
if (!tempDir.isDirectory() && !tempDir.mkdir()) {
throw new IOException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.apache.ratis.statemachine.StateMachineStorage;
import org.apache.ratis.statemachine.TransactionContext;
import org.apache.ratis.statemachine.impl.BaseStateMachine;
import org.apache.ratis.statemachine.impl.SimpleStateMachineStorage;
import org.apache.ratis.statemachine.impl.SingleFileSnapshotInfo;
import org.apache.ratis.thirdparty.com.google.protobuf.ByteString;
import org.apache.ratis.util.ExitUtils;
Expand All @@ -60,7 +61,22 @@
public class StateMachine extends BaseStateMachine {
private static final Logger LOG = LoggerFactory.getLogger(StateMachine.class);

private final CelebornStateMachineStorage storage = new CelebornStateMachineStorage();
private final SimpleStateMachineStorage storage =
new SimpleStateMachineStorage() {

File tmpDir = null;

@Override
public void init(RaftStorage storage) throws IOException {
super.init(storage);
tmpDir = storage.getStorageDir().getTmpDir();
}

@Override
public File getTmpDir() {
return tmpDir;
}
};

private final HARaftServer masterRatisServer;
private RaftGroupId raftGroupId;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<netty.version>4.1.109.Final</netty.version>
<bouncycastle.version>1.77</bouncycastle.version>
<protobuf.version>3.21.7</protobuf.version>
<ratis.version>3.0.1</ratis.version>
<ratis.version>3.1.0</ratis.version>
<scalatest.version>3.2.16</scalatest.version>
<slf4j.version>1.7.36</slf4j.version>
<roaringbitmap.version>1.0.6</roaringbitmap.version>
Expand Down
2 changes: 1 addition & 1 deletion project/CelebornBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ object Dependencies {
val metricsVersion = "4.2.25"
val mockitoVersion = "4.11.0"
val nettyVersion = "4.1.109.Final"
val ratisVersion = "3.0.1"
val ratisVersion = "3.1.0"
val roaringBitmapVersion = "1.0.6"
val rocksdbJniVersion = "8.11.3"
val jacksonVersion = "2.15.3"
Expand Down

0 comments on commit adbef7b

Please sign in to comment.