Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

基于Raft一致性协议的分布式存储系统,参考阿里巴巴SOFAJRaft并使用Java从零实现。Distributed storage system based on Raft consistency protocol, referencing Alibaba SOFAJRaft and implemented from scratch using Java

License

NotificationsYou must be signed in to change notification settings

CoderiGenius/RocksRaft

Repository files navigation

LICENSE

  • 基于Raft一致性协议的分布式存储系统,参考阿里巴巴SOFAJRaft并使用Java从零实现。
  • Distributed storage system based on Raft consistency protocol, referencing Alibaba SOFAJRaft and implemented from scratch using Java

Reference

Related papers

Quick start

  • Basic requirement
    • JDK 1.8+
    • IntelliJ idea
    • maven
  • Clone project
git clone https://github.com/CoderiGenius/RocksRaft.git
  • Import in to idea as maven project
  • Config and start the example of 3 nodes scenario.
    • Config the three yml files insrc/main/resources
    • Start the main function with files listed below
      • src/main/java/Start.java
      • src/main/java/Start2.java
      • src/main/java/Start3.java
  • Wait until the nodes come up.
  • Run the src/main/java/ClientExample.java
  • You should be able to see the log of appendEnties and the procedures of applying to statemachine.
  • Log example:
WARN:appendEntriesRequest CHECK:index 0 dataIsEmpty:false WARN:checkBallotBoxToApply applied:Voting currentIndex:0 length:1 stableLogIndex:0 INFO:Ballot box invokes apply at index 0 length 1 with grant list [PeerId{endpoint=localhost:12220, checksum=0}, PeerId{endpoint=localhost:12230, checksum=0}]INFO:doCommitted at 1 iterImpl:IteratorImpl [fsm=core.CustomStateMachine@22d116d, logManager=core.LogManagerImplNew@61295f0, currentIndex=1, committedIndex=1, currEntry=entity.LogEntry@ceafe80, applyingIndex=1, error=null,isGood=true] isGood:trueINFO:Apply to fsm at 1INFO:Log 1 has been applied to stateMachineINFO:Receive follower raft-3 applied  firstIndex :0 lastIndex:0INFO:Receive follower raft-1 applied  firstIndex :0 lastIndex:0

About

基于Raft一致性协议的分布式存储系统,参考阿里巴巴SOFAJRaft并使用Java从零实现。Distributed storage system based on Raft consistency protocol, referencing Alibaba SOFAJRaft and implemented from scratch using Java

Topics

Resources

License

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp