Skip to content

Commit

Permalink
Change Raft 1.4.0 to 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
loveheaven committed Oct 25, 2018
1 parent a2bf76f commit e8676db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions distmq-broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<dependency>
<groupId>com.github.wenweihu86.raft</groupId>
<artifactId>raft-java-core</artifactId>
<version>1.4.0</version>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand All @@ -121,7 +121,7 @@
<dependency>
<groupId>com.github.wenweihu86.distmq</groupId>
<artifactId>distmq-client</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ public static void main(String[] args) {
// 应用状态机
BrokerStateMachine stateMachine = new BrokerStateMachine(dataDir);
// 设置数据目录
RaftOptions.dataDir = dataDir;
RaftOptions raftOptions = new RaftOptions();
raftOptions.setDataDir(dataDir);
// // just for test snapshot
// RaftOptions.snapshotMinLogSize = 10 * 1024;
// RaftOptions.snapshotPeriodSeconds = 30;
// RaftOptions.maxSegmentFileSize = 1024 * 1024;
// 初始化RaftNode
RaftNode raftNode = new RaftNode(servers, localServer, stateMachine);
RaftNode raftNode = new RaftNode(raftOptions, servers, localServer, stateMachine);
stateMachine.setRaftNode(raftNode);
// 注册Raft节点之间相互调用的服务
RaftConsensusService raftConsensusService = new RaftConsensusServiceImpl(raftNode);
Expand Down
2 changes: 1 addition & 1 deletion distmq-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<dependency>
<groupId>com.github.wenweihu86.distmq</groupId>
<artifactId>distmq-client</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down

0 comments on commit e8676db

Please sign in to comment.