You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by ji...@apache.org on 2017/01/31 21:17:34 UTC

[49/54] [abbrv] incubator-ratis git commit: Renamed the packages from raft to ratis in preperation for Apache Incubation - Moved all java packages from org.apache.raft to org.apache.ratis. - Moved native package to org_apache_ratis, and native lib to l

Renamed the packages from raft to ratis in preperation for Apache Incubation
 - Moved all java packages from org.apache.raft to org.apache.ratis.
 - Moved native package to org_apache_ratis, and native lib to libratis.
 - Moved all modules raft-foo to ratis-foo.
 - Moved artifact classes from com.hortonworks.raft to org.apache.ratis.
 - Individual names for classes (RaftServer, etc) is kept as it is.
 - Usage of "raft" in referring to the protocol is kept as it is.
 - Changed references to previously used name Concur to Ratis.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ratis/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ratis/commit/7e71a2e0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ratis/tree/7e71a2e0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ratis/diff/7e71a2e0

Branch: refs/heads/master
Commit: 7e71a2e0e8ffb01a2168fabdf1d2f66f6ba7c4b9
Parents: bdd5164
Author: Enis Soztutar <en...@apache.org>
Authored: Fri Jan 6 15:36:48 2017 -0800
Committer: Enis Soztutar <en...@apache.org>
Committed: Tue Jan 10 15:24:09 2017 -0800

----------------------------------------------------------------------
 README.md                                       |    6 +-
 pom.xml                                         |   14 +-
 raft-client/pom.xml                             |   54 -
 .../java/org/apache/raft/client/RaftClient.java |   49 -
 .../raft/client/RaftClientConfigKeys.java       |   23 -
 .../raft/client/RaftClientRequestSender.java    |   34 -
 .../raft/client/impl/ClientProtoUtils.java      |  131 --
 .../apache/raft/client/impl/RaftClientImpl.java |  171 --
 raft-common/RaftCommon.cmake                    |  208 ---
 raft-common/RaftJNI.cmake                       |   97 -
 raft-common/pom.xml                             |  143 --
 raft-common/src/CMakeLists.txt                  |  108 --
 raft-common/src/config.h.cmake                  |   24 -
 raft-common/src/main/conf/log4j.properties      |   74 -
 .../org/apache/raft/conf/RaftProperties.java    | 1657 -----------------
 .../main/java/org/apache/raft/io/MD5Hash.java   |  205 ---
 .../java/org/apache/raft/io/nativeio/Errno.java |   64 -
 .../org/apache/raft/io/nativeio/NativeIO.java   |  804 ---------
 .../raft/io/nativeio/NativeIOException.java     |   70 -
 .../raft/protocol/AlreadyExistsException.java   |   36 -
 .../apache/raft/protocol/ChecksumException.java |   35 -
 .../java/org/apache/raft/protocol/Message.java  |   30 -
 .../raft/protocol/NotLeaderException.java       |   40 -
 .../RaftClientAsynchronousProtocol.java         |   30 -
 .../raft/protocol/RaftClientProtocol.java       |   26 -
 .../apache/raft/protocol/RaftClientReply.java   |   91 -
 .../apache/raft/protocol/RaftClientRequest.java |   73 -
 .../org/apache/raft/protocol/RaftException.java |   36 -
 .../java/org/apache/raft/protocol/RaftPeer.java |   79 -
 .../apache/raft/protocol/RaftRpcMessage.java    |   33 -
 .../ReconfigurationInProgressException.java     |   24 -
 .../ReconfigurationTimeoutException.java        |   24 -
 .../raft/protocol/SetConfigurationRequest.java  |   39 -
 .../raft/protocol/StateMachineException.java    |   28 -
 .../raft/util/AtomicFileOutputStream.java       |  112 --
 .../org/apache/raft/util/AutoCloseableLock.java |   57 -
 .../org/apache/raft/util/CheckedFunction.java   |   30 -
 .../org/apache/raft/util/CheckedRunnable.java   |   28 -
 .../raft/util/CodeInjectionForTesting.java      |   67 -
 .../main/java/org/apache/raft/util/Daemon.java  |   35 -
 .../java/org/apache/raft/util/ExitUtils.java    |   98 --
 .../java/org/apache/raft/util/FileUtils.java    |  207 ---
 .../java/org/apache/raft/util/LifeCycle.java    |  210 ---
 .../java/org/apache/raft/util/MD5FileUtil.java  |  176 --
 .../org/apache/raft/util/NativeCodeLoader.java  |   70 -
 .../java/org/apache/raft/util/NativeCrc32.java  |  142 --
 .../apache/raft/util/NativeLibraryChecker.java  |   64 -
 .../java/org/apache/raft/util/NetUtils.java     |  151 --
 .../java/org/apache/raft/util/PeerProxyMap.java |  127 --
 .../java/org/apache/raft/util/ProtoUtils.java   |  141 --
 .../org/apache/raft/util/PureJavaCrc32.java     |  619 -------
 .../org/apache/raft/util/PureJavaCrc32C.java    |  632 -------
 .../java/org/apache/raft/util/RaftUtils.java    |  240 ---
 .../java/org/apache/raft/util/StringUtils.java  |  108 --
 .../java/org/apache/raft/util/Timestamp.java    |   84 -
 raft-common/src/main/native/src/exception.c     |  124 --
 raft-common/src/main/native/src/exception.h     |  104 --
 .../src/org/apache/raft/io/nativeio/NativeIO.c  | 1061 -----------
 .../org/apache/raft/io/nativeio/errno_enum.c    |  123 --
 .../org/apache/raft/io/nativeio/errno_enum.h    |   27 -
 .../apache/raft/io/nativeio/file_descriptor.c   |  115 --
 .../apache/raft/io/nativeio/file_descriptor.h   |   36 -
 .../src/org/apache/raft/util/NativeCodeLoader.c |   56 -
 .../src/org/apache/raft/util/NativeCrc32.c      |  276 ---
 .../src/org/apache/raft/util/bulk_crc32.c       |  244 ---
 .../src/org/apache/raft/util/bulk_crc32.h       |   73 -
 .../org/apache/raft/util/bulk_crc32_aarch64.c   |  362 ----
 .../src/org/apache/raft/util/bulk_crc32_x86.c   |  345 ----
 .../raft/util/crc32_zlib_polynomial_tables.h    |  552 ------
 .../src/org/apache/raft/util/crc32c_tables.h    |  550 ------
 .../org/apache/raft/util/gcc_optimizations.h    |   30 -
 .../src/main/native/src/org_apache_raft.h       |  189 --
 .../test/org/apache/raft/util/test_bulk_crc32.c |  113 --
 .../org/apache/raft/util/TestLifeCycle.java     |   53 -
 raft-examples/pom.xml                           |  130 --
 .../arithmetic/ArithmeticStateMachine.java      |  180 --
 .../examples/arithmetic/AssignmentMessage.java  |   83 -
 .../raft/examples/arithmetic/Evaluable.java     |   24 -
 .../arithmetic/expression/BinaryExpression.java |  103 --
 .../arithmetic/expression/DoubleValue.java      |   61 -
 .../arithmetic/expression/Expression.java       |  111 --
 .../arithmetic/expression/NullValue.java        |   55 -
 .../arithmetic/expression/UnaryExpression.java  |   95 -
 .../arithmetic/expression/Variable.java         |  125 --
 .../java/org/apache/raft/TestBatchAppend.java   |  170 --
 .../org/apache/raft/TestRestartRaftPeer.java    |  114 --
 .../raft/examples/RaftExamplesTestUtil.java     |   81 -
 .../examples/arithmetic/TestArithmetic.java     |  104 --
 .../arithmetic/expression/TestExpression.java   |  102 --
 .../TestRaftStateMachineException.java          |   86 -
 .../src/test/resources/log4j.properties         |   18 -
 raft-grpc/pom.xml                               |   93 -
 .../org/apache/raft/grpc/RaftGRpcService.java   |  151 --
 .../apache/raft/grpc/RaftGrpcConfigKeys.java    |   47 -
 .../java/org/apache/raft/grpc/RaftGrpcUtil.java |   87 -
 .../apache/raft/grpc/client/AppendStreamer.java |  395 -----
 .../grpc/client/RaftClientProtocolClient.java   |   73 -
 .../grpc/client/RaftClientProtocolProxy.java    |  104 --
 .../grpc/client/RaftClientProtocolService.java  |  194 --
 .../grpc/client/RaftClientSenderWithGrpc.java   |  119 --
 .../raft/grpc/client/RaftOutputStream.java      |  112 --
 .../raft/grpc/server/GRpcLogAppender.java       |  415 -----
 .../server/PipelinedLogAppenderFactory.java     |   32 -
 .../grpc/server/RaftServerProtocolClient.java   |   63 -
 .../grpc/server/RaftServerProtocolService.java  |  111 --
 .../raft/grpc/MiniRaftClusterWithGRpc.java      |  135 --
 .../grpc/TestNotLeaderExceptionWithGrpc.java    |   39 -
 .../grpc/TestRaftReconfigurationWithGRpc.java   |   47 -
 .../raft/grpc/TestRaftSnapshotWithGrpc.java     |   32 -
 .../org/apache/raft/grpc/TestRaftStream.java    |  319 ----
 .../org/apache/raft/grpc/TestRaftWithGrpc.java  |   73 -
 raft-grpc/src/test/resources/log4j.properties   |   18 -
 raft-hadoop/pom.xml                             |   99 --
 .../hadoop/ipc/ProtobufRpcEngineShaded.java     |  623 -------
 .../apache/raft/hadooprpc/HadoopConstants.java  |   29 -
 .../java/org/apache/raft/hadooprpc/Proxy.java   |   55 -
 .../client/HadoopClientRequestSender.java       |   68 -
 ...aftClientProtocolClientSideTranslatorPB.java |   70 -
 .../hadooprpc/client/RaftClientProtocolPB.java  |   37 -
 ...aftClientProtocolServerSideTranslatorPB.java |   69 -
 .../raft/hadooprpc/server/HadoopRpcService.java |  178 --
 .../hadooprpc/server/RaftServerProtocolPB.java  |   37 -
 ...aftServerProtocolServerSideTranslatorPB.java |   68 -
 .../hadooprpc/MiniRaftClusterWithHadoopRpc.java |  117 --
 .../TestNotLeaderExceptionWithHadoopRpc.java    |   37 -
 .../TestRaftReconfigurationWithHadoopRpc.java   |   40 -
 .../TestRaftSnapshotWithHadoopRpc.java          |   32 -
 .../raft/hadooprpc/TestRaftWithHadoopRpc.java   |   69 -
 raft-hadoop/src/test/resources/log4j.properties |   18 -
 raft-netty/pom.xml                              |   99 --
 .../java/org/apache/raft/netty/NettyClient.java |   72 -
 .../org/apache/raft/netty/NettyRpcProxy.java    |  180 --
 .../netty/client/NettyClientRequestSender.java  |   71 -
 .../raft/netty/server/NettyRpcService.java      |  253 ---
 .../raft/netty/MiniRaftClusterWithNetty.java    |  117 --
 .../netty/TestNotLeaderExceptionWithNetty.java  |   33 -
 .../netty/TestRaftReconfigurationWithNetty.java |   31 -
 .../raft/netty/TestRaftSnapshotWithNetty.java   |   32 -
 .../apache/raft/netty/TestRaftWithNetty.java    |   62 -
 raft-netty/src/test/resources/log4j.properties  |   18 -
 raft-project-dist/pom.xml                       |  169 --
 raft-project/pom.xml                            |  409 -----
 raft-proto-shaded/.gitignore                    |    2 -
 raft-proto-shaded/README.md                     |   23 -
 raft-proto-shaded/pom.xml                       |  426 -----
 raft-proto-shaded/src/main/proto/GRpc.proto     |   45 -
 raft-proto-shaded/src/main/proto/Hadoop.proto   |   44 -
 raft-proto-shaded/src/main/proto/Netty.proto    |   49 -
 raft-proto-shaded/src/main/proto/Raft.proto     |  165 --
 ...e.raft.shaded.io.grpc.ManagedChannelProvider |   16 -
 ...che.raft.shaded.io.grpc.NameResolverProvider |   16 -
 ...rg.apache.raft.shaded.io.grpc.ServerProvider |   16 -
 raft-server/pom.xml                             |   80 -
 .../java/org/apache/raft/server/RaftServer.java |   44 -
 .../raft/server/RaftServerConfigKeys.java       |  150 --
 .../org/apache/raft/server/RaftServerRpc.java   |   39 -
 .../raft/server/impl/ConfigurationManager.java  |   91 -
 .../apache/raft/server/impl/FollowerInfo.java   |  103 --
 .../apache/raft/server/impl/FollowerState.java  |   91 -
 .../apache/raft/server/impl/LeaderElection.java |  241 ---
 .../apache/raft/server/impl/LeaderState.java    |  582 ------
 .../apache/raft/server/impl/LogAppender.java    |  480 -----
 .../raft/server/impl/LogAppenderFactory.java    |   31 -
 .../raft/server/impl/PeerConfiguration.java     |   90 -
 .../apache/raft/server/impl/PendingRequest.java |   87 -
 .../raft/server/impl/PendingRequests.java       |  129 --
 .../raft/server/impl/RaftConfiguration.java     |  261 ---
 .../raft/server/impl/RaftServerConstants.java   |   46 -
 .../apache/raft/server/impl/RaftServerImpl.java |  813 ---------
 .../raft/server/impl/ServerProtoUtils.java      |  179 --
 .../apache/raft/server/impl/ServerState.java    |  345 ----
 .../apache/raft/server/impl/ServerUtils.java    |   81 -
 .../raft/server/impl/StateMachineUpdater.java   |  213 ---
 .../server/protocol/RaftServerProtocol.java     |   31 -
 .../apache/raft/server/protocol/TermIndex.java  |   36 -
 .../server/storage/BufferedChannelBase.java     |   52 -
 .../server/storage/BufferedWriteChannel.java    |  159 --
 .../apache/raft/server/storage/FileInfo.java    |   59 -
 .../raft/server/storage/LogInputStream.java     |  258 ---
 .../raft/server/storage/LogOutputStream.java    |  176 --
 .../apache/raft/server/storage/LogReader.java   |  292 ---
 .../apache/raft/server/storage/LogSegment.java  |  232 ---
 .../raft/server/storage/MemoryRaftLog.java      |  182 --
 .../apache/raft/server/storage/MetaFile.java    |  130 --
 .../org/apache/raft/server/storage/RaftLog.java |  292 ---
 .../raft/server/storage/RaftLogCache.java       |  323 ----
 .../raft/server/storage/RaftLogWorker.java      |  371 ----
 .../apache/raft/server/storage/RaftStorage.java |  144 --
 .../server/storage/RaftStorageDirectory.java    |  360 ----
 .../raft/server/storage/SegmentedRaftLog.java   |  327 ----
 .../raft/server/storage/SnapshotManager.java    |  133 --
 .../raft/statemachine/BaseStateMachine.java     |  150 --
 .../raft/statemachine/FileListSnapshotInfo.java |   64 -
 .../statemachine/SimpleStateMachineStorage.java |  134 --
 .../statemachine/SingleFileSnapshotInfo.java    |   38 -
 .../apache/raft/statemachine/SnapshotInfo.java  |   58 -
 .../apache/raft/statemachine/StateMachine.java  |  168 --
 .../raft/statemachine/StateMachineStorage.java  |   39 -
 .../raft/statemachine/TransactionContext.java   |  210 ---
 .../java/org/apache/raft/MiniRaftCluster.java   |  444 -----
 .../java/org/apache/raft/RaftBasicTests.java    |  199 ---
 .../raft/RaftNotLeaderExceptionBaseTest.java    |  162 --
 .../test/java/org/apache/raft/RaftTestUtil.java |  305 ----
 .../impl/BlockRequestHandlingInjection.java     |   84 -
 .../impl/DelayLocalExecutionInjection.java      |   67 -
 .../impl/RaftReconfigurationBaseTest.java       |  577 ------
 .../raft/server/impl/RaftServerTestUtil.java    |   73 -
 .../MiniRaftClusterWithSimulatedRpc.java        |  136 --
 .../raft/server/simulation/RaftServerReply.java |   99 --
 .../server/simulation/RaftServerRequest.java    |   98 --
 .../raft/server/simulation/RequestHandler.java  |  134 --
 .../simulation/SimulatedClientRequestReply.java |   45 -
 .../simulation/SimulatedRequestReply.java       |  201 ---
 .../server/simulation/SimulatedServerRpc.java   |  167 --
 .../TestNotLeaderExceptionWithSimulation.java   |   32 -
 ...TestRaftReconfigurationWithSimulatedRpc.java |   31 -
 .../TestRaftSnapshotWithSimulatedRpc.java       |   32 -
 .../simulation/TestRaftWithSimulatedRpc.java    |   51 -
 .../raft/server/storage/TestRaftLogCache.java   |  255 ---
 .../server/storage/TestRaftLogReadWrite.java    |  266 ---
 .../raft/server/storage/TestRaftLogSegment.java |  303 ----
 .../raft/server/storage/TestRaftStorage.java    |  212 ---
 .../server/storage/TestSegmentedRaftLog.java    |  329 ----
 .../raft/statemachine/RaftSnapshotBaseTest.java |  215 ---
 .../SimpleStateMachine4Testing.java             |  245 ---
 .../raft/statemachine/TermIndexTracker.java     |   66 -
 .../raft/statemachine/TestStateMachine.java     |  186 --
 raft-server/src/test/resources/log4j.properties |   18 -
 ratis-client/pom.xml                            |   54 +
 .../org/apache/ratis/client/RaftClient.java     |   49 +
 .../ratis/client/RaftClientConfigKeys.java      |   23 +
 .../ratis/client/RaftClientRequestSender.java   |   34 +
 .../ratis/client/impl/ClientProtoUtils.java     |  131 ++
 .../ratis/client/impl/RaftClientImpl.java       |  172 ++
 ratis-common/RatisCommon.cmake                  |  208 +++
 ratis-common/RatisJNI.cmake                     |   97 +
 ratis-common/pom.xml                            |  143 ++
 ratis-common/src/CMakeLists.txt                 |  108 ++
 ratis-common/src/config.h.cmake                 |   24 +
 ratis-common/src/main/conf/log4j.properties     |   74 +
 .../org/apache/ratis/conf/RaftProperties.java   | 1658 ++++++++++++++++++
 .../main/java/org/apache/ratis/io/MD5Hash.java  |  205 +++
 .../org/apache/ratis/io/nativeio/Errno.java     |   64 +
 .../org/apache/ratis/io/nativeio/NativeIO.java  |  805 +++++++++
 .../ratis/io/nativeio/NativeIOException.java    |   70 +
 .../ratis/protocol/AlreadyExistsException.java  |   36 +
 .../ratis/protocol/ChecksumException.java       |   35 +
 .../java/org/apache/ratis/protocol/Message.java |   30 +
 .../ratis/protocol/NotLeaderException.java      |   40 +
 .../RaftClientAsynchronousProtocol.java         |   30 +
 .../ratis/protocol/RaftClientProtocol.java      |   26 +
 .../apache/ratis/protocol/RaftClientReply.java  |   91 +
 .../ratis/protocol/RaftClientRequest.java       |   73 +
 .../apache/ratis/protocol/RaftException.java    |   36 +
 .../org/apache/ratis/protocol/RaftPeer.java     |   79 +
 .../apache/ratis/protocol/RaftRpcMessage.java   |   33 +
 .../ReconfigurationInProgressException.java     |   24 +
 .../ReconfigurationTimeoutException.java        |   24 +
 .../ratis/protocol/SetConfigurationRequest.java |   39 +
 .../ratis/protocol/StateMachineException.java   |   28 +
 .../ratis/util/AtomicFileOutputStream.java      |  112 ++
 .../apache/ratis/util/AutoCloseableLock.java    |   57 +
 .../org/apache/ratis/util/CheckedFunction.java  |   30 +
 .../org/apache/ratis/util/CheckedRunnable.java  |   28 +
 .../ratis/util/CodeInjectionForTesting.java     |   67 +
 .../main/java/org/apache/ratis/util/Daemon.java |   35 +
 .../java/org/apache/ratis/util/ExitUtils.java   |   98 ++
 .../java/org/apache/ratis/util/FileUtils.java   |  207 +++
 .../java/org/apache/ratis/util/LifeCycle.java   |  210 +++
 .../java/org/apache/ratis/util/MD5FileUtil.java |  177 ++
 .../org/apache/ratis/util/NativeCodeLoader.java |   70 +
 .../java/org/apache/ratis/util/NativeCrc32.java |  143 ++
 .../apache/ratis/util/NativeLibraryChecker.java |   64 +
 .../java/org/apache/ratis/util/NetUtils.java    |  151 ++
 .../org/apache/ratis/util/PeerProxyMap.java     |  128 ++
 .../java/org/apache/ratis/util/ProtoUtils.java  |  147 ++
 .../org/apache/ratis/util/PureJavaCrc32.java    |  619 +++++++
 .../org/apache/ratis/util/PureJavaCrc32C.java   |  632 +++++++
 .../java/org/apache/ratis/util/RaftUtils.java   |  240 +++
 .../java/org/apache/ratis/util/StringUtils.java |  108 ++
 .../java/org/apache/ratis/util/Timestamp.java   |   84 +
 ratis-common/src/main/native/src/exception.c    |  124 ++
 ratis-common/src/main/native/src/exception.h    |  104 ++
 .../src/org/apache/ratis/io/nativeio/NativeIO.c | 1061 +++++++++++
 .../org/apache/ratis/io/nativeio/errno_enum.c   |  123 ++
 .../org/apache/ratis/io/nativeio/errno_enum.h   |   27 +
 .../apache/ratis/io/nativeio/file_descriptor.c  |  115 ++
 .../apache/ratis/io/nativeio/file_descriptor.h  |   36 +
 .../org/apache/ratis/util/NativeCodeLoader.c    |   56 +
 .../src/org/apache/ratis/util/NativeCrc32.c     |  276 +++
 .../src/org/apache/ratis/util/bulk_crc32.c      |  244 +++
 .../src/org/apache/ratis/util/bulk_crc32.h      |   73 +
 .../org/apache/ratis/util/bulk_crc32_aarch64.c  |  362 ++++
 .../src/org/apache/ratis/util/bulk_crc32_x86.c  |  345 ++++
 .../ratis/util/crc32_zlib_polynomial_tables.h   |  552 ++++++
 .../src/org/apache/ratis/util/crc32c_tables.h   |  550 ++++++
 .../org/apache/ratis/util/gcc_optimizations.h   |   30 +
 .../src/main/native/src/org_apache_ratis.h      |  189 ++
 .../org/apache/ratis/util/test_bulk_crc32.c     |  113 ++
 .../org/apache/ratis/util/TestLifeCycle.java    |   54 +
 ratis-examples/pom.xml                          |  130 ++
 .../arithmetic/ArithmeticStateMachine.java      |  181 ++
 .../examples/arithmetic/AssignmentMessage.java  |   83 +
 .../ratis/examples/arithmetic/Evaluable.java    |   24 +
 .../arithmetic/expression/BinaryExpression.java |  103 ++
 .../arithmetic/expression/DoubleValue.java      |   61 +
 .../arithmetic/expression/Expression.java       |  112 ++
 .../arithmetic/expression/NullValue.java        |   55 +
 .../arithmetic/expression/UnaryExpression.java  |   95 +
 .../arithmetic/expression/Variable.java         |  126 ++
 .../java/org/apache/ratis/TestBatchAppend.java  |  172 ++
 .../org/apache/ratis/TestRestartRaftPeer.java   |  116 ++
 .../ratis/examples/RaftExamplesTestUtil.java    |   81 +
 .../examples/arithmetic/TestArithmetic.java     |  106 ++
 .../arithmetic/expression/TestExpression.java   |  107 ++
 .../TestRaftStateMachineException.java          |   88 +
 .../src/test/resources/log4j.properties         |   18 +
 ratis-grpc/pom.xml                              |   93 +
 .../org/apache/ratis/grpc/RaftGRpcService.java  |  152 ++
 .../apache/ratis/grpc/RaftGrpcConfigKeys.java   |   47 +
 .../org/apache/ratis/grpc/RaftGrpcUtil.java     |   87 +
 .../ratis/grpc/client/AppendStreamer.java       |  396 +++++
 .../grpc/client/RaftClientProtocolClient.java   |   73 +
 .../grpc/client/RaftClientProtocolProxy.java    |  104 ++
 .../grpc/client/RaftClientProtocolService.java  |  195 ++
 .../grpc/client/RaftClientSenderWithGrpc.java   |  119 ++
 .../ratis/grpc/client/RaftOutputStream.java     |  112 ++
 .../ratis/grpc/server/GRpcLogAppender.java      |  416 +++++
 .../server/PipelinedLogAppenderFactory.java     |   32 +
 .../grpc/server/RaftServerProtocolClient.java   |   63 +
 .../grpc/server/RaftServerProtocolService.java  |  116 ++
 .../ratis/grpc/MiniRaftClusterWithGRpc.java     |  138 ++
 .../grpc/TestNotLeaderExceptionWithGrpc.java    |   39 +
 .../grpc/TestRaftReconfigurationWithGRpc.java   |   47 +
 .../ratis/grpc/TestRaftSnapshotWithGrpc.java    |   32 +
 .../org/apache/ratis/grpc/TestRaftStream.java   |  319 ++++
 .../org/apache/ratis/grpc/TestRaftWithGrpc.java |   73 +
 ratis-grpc/src/test/resources/log4j.properties  |   18 +
 ratis-hadoop/pom.xml                            |   99 ++
 .../hadoop/ipc/ProtobufRpcEngineShaded.java     |  623 +++++++
 .../apache/ratis/hadooprpc/HadoopConstants.java |   29 +
 .../java/org/apache/ratis/hadooprpc/Proxy.java  |   55 +
 .../client/HadoopClientRequestSender.java       |   68 +
 ...aftClientProtocolClientSideTranslatorPB.java |   70 +
 .../hadooprpc/client/RaftClientProtocolPB.java  |   37 +
 ...aftClientProtocolServerSideTranslatorPB.java |   69 +
 .../hadooprpc/server/HadoopRpcService.java      |  184 ++
 .../hadooprpc/server/RaftServerProtocolPB.java  |   37 +
 ...aftServerProtocolServerSideTranslatorPB.java |   73 +
 .../hadooprpc/MiniRaftClusterWithHadoopRpc.java |  117 ++
 .../TestNotLeaderExceptionWithHadoopRpc.java    |   37 +
 .../TestRaftReconfigurationWithHadoopRpc.java   |   40 +
 .../TestRaftSnapshotWithHadoopRpc.java          |   32 +
 .../ratis/hadooprpc/TestRaftWithHadoopRpc.java  |   69 +
 .../src/test/resources/log4j.properties         |   18 +
 ratis-netty/pom.xml                             |   99 ++
 .../org/apache/ratis/netty/NettyClient.java     |   73 +
 .../org/apache/ratis/netty/NettyRpcProxy.java   |  186 ++
 .../netty/client/NettyClientRequestSender.java  |   71 +
 .../ratis/netty/server/NettyRpcService.java     |  254 +++
 .../ratis/netty/MiniRaftClusterWithNetty.java   |  117 ++
 .../netty/TestNotLeaderExceptionWithNetty.java  |   33 +
 .../netty/TestRaftReconfigurationWithNetty.java |   31 +
 .../ratis/netty/TestRaftSnapshotWithNetty.java  |   32 +
 .../apache/ratis/netty/TestRaftWithNetty.java   |   62 +
 ratis-netty/src/test/resources/log4j.properties |   18 +
 ratis-project-dist/pom.xml                      |  169 ++
 ratis-project/pom.xml                           |  409 +++++
 ratis-proto-shaded/.gitignore                   |    2 +
 ratis-proto-shaded/README.md                    |   23 +
 ratis-proto-shaded/pom.xml                      |  426 +++++
 ratis-proto-shaded/src/main/proto/GRpc.proto    |   45 +
 ratis-proto-shaded/src/main/proto/Hadoop.proto  |   44 +
 ratis-proto-shaded/src/main/proto/Netty.proto   |   49 +
 ratis-proto-shaded/src/main/proto/Raft.proto    |  165 ++
 ....ratis.shaded.io.grpc.ManagedChannelProvider |   16 +
 ...he.ratis.shaded.io.grpc.NameResolverProvider |   16 +
 ...g.apache.ratis.shaded.io.grpc.ServerProvider |   16 +
 ratis-server/pom.xml                            |   80 +
 .../org/apache/ratis/server/RaftServer.java     |   44 +
 .../ratis/server/RaftServerConfigKeys.java      |  150 ++
 .../org/apache/ratis/server/RaftServerRpc.java  |   39 +
 .../ratis/server/impl/ConfigurationManager.java |   91 +
 .../apache/ratis/server/impl/FollowerInfo.java  |  103 ++
 .../apache/ratis/server/impl/FollowerState.java |   91 +
 .../ratis/server/impl/LeaderElection.java       |  247 +++
 .../apache/ratis/server/impl/LeaderState.java   |  601 +++++++
 .../apache/ratis/server/impl/LogAppender.java   |  494 ++++++
 .../ratis/server/impl/LogAppenderFactory.java   |   31 +
 .../ratis/server/impl/PeerConfiguration.java    |   91 +
 .../ratis/server/impl/PendingRequest.java       |   88 +
 .../ratis/server/impl/PendingRequests.java      |  130 ++
 .../ratis/server/impl/RaftConfiguration.java    |  262 +++
 .../ratis/server/impl/RaftServerConstants.java  |   46 +
 .../ratis/server/impl/RaftServerImpl.java       |  832 +++++++++
 .../ratis/server/impl/ServerProtoUtils.java     |  191 ++
 .../apache/ratis/server/impl/ServerState.java   |  350 ++++
 .../apache/ratis/server/impl/ServerUtils.java   |   81 +
 .../ratis/server/impl/StateMachineUpdater.java  |  214 +++
 .../server/protocol/RaftServerProtocol.java     |   36 +
 .../apache/ratis/server/protocol/TermIndex.java |   36 +
 .../server/storage/BufferedChannelBase.java     |   52 +
 .../server/storage/BufferedWriteChannel.java    |  159 ++
 .../apache/ratis/server/storage/FileInfo.java   |   59 +
 .../ratis/server/storage/LogInputStream.java    |  259 +++
 .../ratis/server/storage/LogOutputStream.java   |  181 ++
 .../apache/ratis/server/storage/LogReader.java  |  302 ++++
 .../apache/ratis/server/storage/LogSegment.java |  233 +++
 .../ratis/server/storage/MemoryRaftLog.java     |  183 ++
 .../apache/ratis/server/storage/MetaFile.java   |  131 ++
 .../apache/ratis/server/storage/RaftLog.java    |  293 ++++
 .../ratis/server/storage/RaftLogCache.java      |  328 ++++
 .../ratis/server/storage/RaftLogWorker.java     |  372 ++++
 .../ratis/server/storage/RaftStorage.java       |  145 ++
 .../server/storage/RaftStorageDirectory.java    |  361 ++++
 .../ratis/server/storage/SegmentedRaftLog.java  |  328 ++++
 .../ratis/server/storage/SnapshotManager.java   |  134 ++
 .../ratis/statemachine/BaseStateMachine.java    |  151 ++
 .../statemachine/FileListSnapshotInfo.java      |   64 +
 .../statemachine/SimpleStateMachineStorage.java |  135 ++
 .../statemachine/SingleFileSnapshotInfo.java    |   38 +
 .../apache/ratis/statemachine/SnapshotInfo.java |   58 +
 .../apache/ratis/statemachine/StateMachine.java |  168 ++
 .../ratis/statemachine/StateMachineStorage.java |   40 +
 .../ratis/statemachine/TransactionContext.java  |  210 +++
 .../java/org/apache/ratis/MiniRaftCluster.java  |  445 +++++
 .../java/org/apache/ratis/RaftBasicTests.java   |  199 +++
 .../ratis/RaftNotLeaderExceptionBaseTest.java   |  162 ++
 .../java/org/apache/ratis/RaftTestUtil.java     |  306 ++++
 .../impl/BlockRequestHandlingInjection.java     |   85 +
 .../impl/DelayLocalExecutionInjection.java      |   67 +
 .../impl/RaftReconfigurationBaseTest.java       |  581 ++++++
 .../ratis/server/impl/RaftServerTestUtil.java   |   75 +
 .../MiniRaftClusterWithSimulatedRpc.java        |  136 ++
 .../server/simulation/RaftServerReply.java      |  100 ++
 .../server/simulation/RaftServerRequest.java    |   98 ++
 .../ratis/server/simulation/RequestHandler.java |  134 ++
 .../simulation/SimulatedClientRequestReply.java |   45 +
 .../simulation/SimulatedRequestReply.java       |  202 +++
 .../server/simulation/SimulatedServerRpc.java   |  175 ++
 .../TestNotLeaderExceptionWithSimulation.java   |   32 +
 ...TestRaftReconfigurationWithSimulatedRpc.java |   31 +
 .../TestRaftSnapshotWithSimulatedRpc.java       |   32 +
 .../simulation/TestRaftWithSimulatedRpc.java    |   51 +
 .../ratis/server/storage/TestRaftLogCache.java  |  255 +++
 .../server/storage/TestRaftLogReadWrite.java    |  269 +++
 .../server/storage/TestRaftLogSegment.java      |  305 ++++
 .../ratis/server/storage/TestRaftStorage.java   |  215 +++
 .../server/storage/TestSegmentedRaftLog.java    |  329 ++++
 .../statemachine/RaftSnapshotBaseTest.java      |  214 +++
 .../SimpleStateMachine4Testing.java             |  246 +++
 .../ratis/statemachine/TermIndexTracker.java    |   67 +
 .../ratis/statemachine/TestStateMachine.java    |  192 ++
 .../src/test/resources/log4j.properties         |   18 +
 454 files changed, 34514 insertions(+), 34302 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 3c2320b..1ec276d 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
-# Concur
-Concur is a java library that implements the RAFT protocol[1]. The Raft paper can be accessed at [this link] (https://raft.github.io/raft.pdf). The paper introduces Raft and states its motivations in following words:
+# Ratis
+Ratis is a java library that implements the RAFT protocol[1]. The Raft paper can be accessed at [this link] (https://raft.github.io/raft.pdf). The paper introduces Raft and states its motivations in following words:
   > Raft is a consensus algorithm for managing a replicated log. It produces a result equivalent to (multi-)Paxos, and it is as efficient as Paxos, but its structure is different from Paxos; this makes Raft more understandable than Paxos and also provides a better foundation for building practical systems.
 
-  Concur aims to make raft available as a java library that can be used by any system that needs to use a replicated log. Concur provides pluggability for state machine implementations to manage replicated states. It also provides pluggability for Raft log, and rpc implementations to make it easy for integration with other projects. Another important goal is to support high throughput data ingest so that it can be used for more general data replication use cases.
+  Ratis aims to make raft available as a java library that can be used by any system that needs to use a replicated log. It provides pluggability for state machine implementations to manage replicated states. It also provides pluggability for Raft log, and rpc implementations to make it easy for integration with other projects. Another important goal is to support high throughput data ingest so that it can be used for more general data replication use cases.
 
 
 # Reference

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e40e132..9ad746d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,10 +17,10 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
-  <artifactId>raft-main</artifactId>
-  <groupId>com.hortonworks.raft</groupId>
+  <artifactId>ratis-main</artifactId>
+  <groupId>org.apache.ratis</groupId>
   <version>1.0-SNAPSHOT</version>
-  <name>Raft Main</name>
+  <name>Ratis Main</name>
   <packaging>pom</packaging>
 
   <licenses>
@@ -63,8 +63,8 @@
   </properties>
 
   <modules>
-    <module>raft-proto-shaded</module>
-    <module>raft-project</module>
+    <module>ratis-proto-shaded</module>
+    <module>ratis-project</module>
   </modules>
 
   <build>
@@ -142,8 +142,8 @@
             <forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
             <argLine>-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError</argLine>
             <systemPropertyVariables>
-              <raft.log.dir>${project.build.directory}/log</raft.log.dir>
-              <raft.tmp.dir>${project.build.directory}/tmp</raft.tmp.dir>
+              <ratis.log.dir>${project.build.directory}/log</ratis.log.dir>
+              <ratis.tmp.dir>${project.build.directory}/tmp</ratis.tmp.dir>
 
               <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
             </systemPropertyVariables>

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/raft-client/pom.xml
----------------------------------------------------------------------
diff --git a/raft-client/pom.xml b/raft-client/pom.xml
deleted file mode 100644
index 7d63931..0000000
--- a/raft-client/pom.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License. See accompanying LICENSE file.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <artifactId>raft-project-dist</artifactId>
-    <groupId>com.hortonworks.raft</groupId>
-    <version>1.0-SNAPSHOT</version>
-    <relativePath>../raft-project-dist</relativePath>
-  </parent>
-
-  <artifactId>raft-client</artifactId>
-  <name>Raft Client</name>
-
-  <dependencies>
-    <dependency>
-      <artifactId>raft-proto-shaded</artifactId>
-      <groupId>com.hortonworks.raft</groupId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <artifactId>raft-common</artifactId>
-      <groupId>com.hortonworks.raft</groupId>
-      <scope>provided</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <scope>compile</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-      <scope>compile</scope>
-    </dependency>
-  </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/raft-client/src/main/java/org/apache/raft/client/RaftClient.java
----------------------------------------------------------------------
diff --git a/raft-client/src/main/java/org/apache/raft/client/RaftClient.java b/raft-client/src/main/java/org/apache/raft/client/RaftClient.java
deleted file mode 100644
index d67eded..0000000
--- a/raft-client/src/main/java/org/apache/raft/client/RaftClient.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.raft.client;
-
-import org.apache.raft.protocol.Message;
-import org.apache.raft.protocol.RaftClientReply;
-import org.apache.raft.protocol.RaftPeer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.Closeable;
-import java.io.IOException;
-
-/** A client who sends requests to a raft service. */
-public interface RaftClient extends Closeable {
-  Logger LOG = LoggerFactory.getLogger(RaftClient.class);
-  long DEFAULT_SEQNUM = 0;
-
-  /** @return the id of this client. */
-  String getId();
-
-  /**
-   * Send the given message to the raft service.
-   * The message may change the state of the service.
-   * For readonly messages, use {@link #sendReadOnly(Message)} instead.
-   */
-  RaftClientReply send(Message message) throws IOException;
-
-  /** Send the given readonly message to the raft service. */
-  RaftClientReply sendReadOnly(Message message) throws IOException;
-
-  /** Send set configuration request to the raft service. */
-  RaftClientReply setConfiguration(RaftPeer[] peersInNewConf) throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/raft-client/src/main/java/org/apache/raft/client/RaftClientConfigKeys.java
----------------------------------------------------------------------
diff --git a/raft-client/src/main/java/org/apache/raft/client/RaftClientConfigKeys.java b/raft-client/src/main/java/org/apache/raft/client/RaftClientConfigKeys.java
deleted file mode 100644
index 7e93d08..0000000
--- a/raft-client/src/main/java/org/apache/raft/client/RaftClientConfigKeys.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.raft.client;
-
-public interface RaftClientConfigKeys {
-  String RAFT_RPC_TIMEOUT_MS_KEY = "raft.rpc.timeout.ms";
-  int RAFT_RPC_TIMEOUT_MS_DEFAULT = 300;
-}

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/raft-client/src/main/java/org/apache/raft/client/RaftClientRequestSender.java
----------------------------------------------------------------------
diff --git a/raft-client/src/main/java/org/apache/raft/client/RaftClientRequestSender.java b/raft-client/src/main/java/org/apache/raft/client/RaftClientRequestSender.java
deleted file mode 100644
index aca0840..0000000
--- a/raft-client/src/main/java/org/apache/raft/client/RaftClientRequestSender.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.raft.client;
-
-import org.apache.raft.protocol.RaftClientReply;
-import org.apache.raft.protocol.RaftClientRequest;
-import org.apache.raft.protocol.RaftPeer;
-
-import java.io.Closeable;
-import java.io.IOException;
-
-/** Send requests to a raft service. */
-public interface RaftClientRequestSender extends Closeable {
-  /** Send a request. */
-  RaftClientReply sendRequest(RaftClientRequest request) throws IOException;
-
-  /** Add the information of the given raft servers */
-  void addServers(Iterable<RaftPeer> servers);
-}

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/raft-client/src/main/java/org/apache/raft/client/impl/ClientProtoUtils.java
----------------------------------------------------------------------
diff --git a/raft-client/src/main/java/org/apache/raft/client/impl/ClientProtoUtils.java b/raft-client/src/main/java/org/apache/raft/client/impl/ClientProtoUtils.java
deleted file mode 100644
index f909418..0000000
--- a/raft-client/src/main/java/org/apache/raft/client/impl/ClientProtoUtils.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.raft.client.impl;
-
-import org.apache.raft.protocol.*;
-import org.apache.raft.shaded.com.google.protobuf.ByteString;
-import org.apache.raft.shaded.proto.RaftProtos.*;
-import org.apache.raft.util.ProtoUtils;
-
-import java.util.Arrays;
-
-public class ClientProtoUtils {
-  public static RaftRpcReplyProto.Builder toRaftRpcReplyProtoBuilder(
-      String requestorId, String replyId, long seqNum, boolean success) {
-    return RaftRpcReplyProto.newBuilder()
-        .setRequestorId(requestorId).setReplyId(replyId).setSeqNum(seqNum)
-        .setSuccess(success);
-  }
-
-  public static RaftRpcRequestProto.Builder toRaftRpcRequestProtoBuilder(
-      String requesterId, String replyId, long seqNum) {
-    return RaftRpcRequestProto.newBuilder()
-        .setRequestorId(requesterId).setReplyId(replyId).setSeqNum(seqNum);
-  }
-
-  public static RaftClientRequest toRaftClientRequest(RaftClientRequestProto p) {
-    return new RaftClientRequest(p.getRpcRequest().getRequestorId(),
-        p.getRpcRequest().getReplyId(), p.getRpcRequest().getSeqNum(),
-        toMessage(p.getMessage()), p.getReadOnly());
-  }
-
-  public static RaftClientRequestProto toRaftClientRequestProto(
-      RaftClientRequest request) {
-    return RaftClientRequestProto.newBuilder()
-        .setRpcRequest(toRaftRpcRequestProtoBuilder(request.getRequestorId(),
-            request.getReplierId(), request.getSeqNum()))
-        .setMessage(toClientMessageEntryProto(request.getMessage()))
-        .setReadOnly(request.isReadOnly())
-        .build();
-  }
-
-  public static RaftClientRequestProto genRaftClientRequestProto(
-      String requestorId, String replierId, long seqNum, ByteString content,
-      boolean readOnly) {
-    return RaftClientRequestProto.newBuilder()
-        .setRpcRequest(toRaftRpcRequestProtoBuilder(requestorId, replierId, seqNum))
-        .setMessage(ClientMessageEntryProto.newBuilder().setContent(content))
-        .setReadOnly(readOnly)
-        .build();
-  }
-
-  public static RaftClientReplyProto toRaftClientReplyProto(
-      RaftClientReply reply) {
-    final RaftClientReplyProto.Builder b = RaftClientReplyProto.newBuilder();
-    if (reply != null) {
-      b.setRpcReply(toRaftRpcReplyProtoBuilder(reply.getRequestorId(),
-          reply.getReplierId(), reply.getSeqNum(), reply.isSuccess()));
-      if (reply.getMessage() != null) {
-        b.setMessage(toClientMessageEntryProto(reply.getMessage()));
-      }
-      if (reply.isNotLeader()) {
-        b.setIsNotLeader(true);
-        final RaftPeer suggestedLeader = reply.getNotLeaderException()
-            .getSuggestedLeader();
-        if (suggestedLeader != null) {
-          b.setSuggestedLeader(ProtoUtils.toRaftPeerProto(suggestedLeader));
-        }
-        b.addAllPeersInConf(ProtoUtils.toRaftPeerProtos(
-            Arrays.asList(reply.getNotLeaderException().getPeers())));
-      }
-    }
-    return b.build();
-  }
-
-  public static RaftClientReply toRaftClientReply(
-      RaftClientReplyProto replyProto) {
-    final RaftRpcReplyProto rp = replyProto.getRpcReply();
-    NotLeaderException e = null;
-    if (replyProto.getIsNotLeader()) {
-      final RaftPeer suggestedLeader = replyProto.hasSuggestedLeader() ?
-          ProtoUtils.toRaftPeer(replyProto.getSuggestedLeader()) : null;
-      final RaftPeer[] peers = ProtoUtils.toRaftPeerArray(
-          replyProto.getPeersInConfList());
-      e = new NotLeaderException(rp.getReplyId(), suggestedLeader, peers);
-    }
-    return new RaftClientReply(rp.getRequestorId(), rp.getReplyId(),
-        rp.getSeqNum(), rp.getSuccess(), toMessage(replyProto.getMessage()), e);
-  }
-
-  public static Message toMessage(final ClientMessageEntryProto p) {
-    return p::getContent;
-  }
-
-  public static ClientMessageEntryProto toClientMessageEntryProto(Message message) {
-    return ClientMessageEntryProto.newBuilder()
-        .setContent(message.getContent()).build();
-  }
-
-  public static SetConfigurationRequest toSetConfigurationRequest(
-      SetConfigurationRequestProto p) {
-    final RaftRpcRequestProto m = p.getRpcRequest();
-    final RaftPeer[] peers = ProtoUtils.toRaftPeerArray(p.getPeersList());
-    return new SetConfigurationRequest(m.getRequestorId(), m.getReplyId(),
-        p.getRpcRequest().getSeqNum(), peers);
-  }
-
-  public static SetConfigurationRequestProto toSetConfigurationRequestProto(
-      SetConfigurationRequest request) {
-    return SetConfigurationRequestProto.newBuilder()
-        .setRpcRequest(toRaftRpcRequestProtoBuilder(request.getRequestorId(),
-            request.getReplierId(), request.getSeqNum()))
-        .addAllPeers(ProtoUtils.toRaftPeerProtos(
-            Arrays.asList(request.getPeersInNewConf())))
-        .build();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/raft-client/src/main/java/org/apache/raft/client/impl/RaftClientImpl.java
----------------------------------------------------------------------
diff --git a/raft-client/src/main/java/org/apache/raft/client/impl/RaftClientImpl.java b/raft-client/src/main/java/org/apache/raft/client/impl/RaftClientImpl.java
deleted file mode 100644
index 132d092..0000000
--- a/raft-client/src/main/java/org/apache/raft/client/impl/RaftClientImpl.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.raft.client.impl;
-
-import com.google.common.annotations.VisibleForTesting;
-import org.apache.raft.client.RaftClient;
-import org.apache.raft.client.RaftClientConfigKeys;
-import org.apache.raft.client.RaftClientRequestSender;
-import org.apache.raft.conf.RaftProperties;
-import org.apache.raft.protocol.*;
-import org.apache.raft.util.RaftUtils;
-import org.apache.raft.util.StringUtils;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Map;
-import java.util.function.Function;
-import java.util.function.Supplier;
-import java.util.stream.Collectors;
-
-/** A client who sends requests to a raft service. */
-public final class RaftClientImpl implements RaftClient {
-  public static final long DEFAULT_SEQNUM = 0;
-
-  private final String clientId;
-  private final RaftClientRequestSender requestSender;
-  private final Map<String, RaftPeer> peers;
-  private final int retryInterval;
-
-  private volatile String leaderId;
-
-  public RaftClientImpl(
-      String clientId, Collection<RaftPeer> peers,
-      RaftClientRequestSender requestSender, String leaderId,
-      RaftProperties properties) {
-    this.clientId = clientId;
-    this.requestSender = requestSender;
-    this.peers = peers.stream().collect(
-        Collectors.toMap(RaftPeer::getId, Function.identity()));
-    this.leaderId = leaderId != null? leaderId : peers.iterator().next().getId();
-    this.retryInterval = properties.getInt(
-        RaftClientConfigKeys.RAFT_RPC_TIMEOUT_MS_KEY,
-        RaftClientConfigKeys.RAFT_RPC_TIMEOUT_MS_DEFAULT);
-  }
-
-  @Override
-  public String getId() {
-    return clientId;
-  }
-
-  @Override
-  public RaftClientReply send(Message message) throws IOException {
-    return send(message, false);
-  }
-
-  @Override
-  public RaftClientReply sendReadOnly(Message message) throws IOException {
-    return send(message, true);
-  }
-
-  private RaftClientReply send(Message message, boolean readOnly) throws IOException {
-    return sendRequestWithRetry(() -> new RaftClientRequest(
-        clientId, leaderId, DEFAULT_SEQNUM, message, readOnly));
-  }
-
-  @Override
-  public RaftClientReply setConfiguration(RaftPeer[] peersInNewConf)
-      throws IOException {
-    return sendRequestWithRetry(() -> new SetConfigurationRequest(
-        clientId, leaderId, DEFAULT_SEQNUM, peersInNewConf));
-  }
-
-  private RaftClientReply sendRequestWithRetry(
-      Supplier<RaftClientRequest> supplier)
-      throws InterruptedIOException, StateMachineException {
-    for(;;) {
-      final RaftClientRequest request = supplier.get();
-      LOG.debug("{}: {}", clientId, request);
-      final RaftClientReply reply = sendRequest(request);
-      if (reply != null) {
-        LOG.debug("{}: {}", clientId, reply);
-        return reply;
-      }
-
-      // sleep and then retry
-      try {
-        Thread.sleep(retryInterval);
-      } catch (InterruptedException ie) {
-        Thread.currentThread().interrupt();
-        throw RaftUtils.toInterruptedIOException(
-            "Interrupted when sending " + request, ie);
-      }
-    }
-  }
-
-  private RaftClientReply sendRequest(RaftClientRequest request)
-      throws StateMachineException {
-    try {
-      RaftClientReply reply = requestSender.sendRequest(request);
-      if (reply.isNotLeader()) {
-        handleNotLeaderException(request, reply.getNotLeaderException());
-        return null;
-      } else {
-        return reply;
-      }
-    } catch (StateMachineException e) {
-      throw e;
-    } catch (IOException ioe) {
-      // TODO different retry policies for different exceptions
-      handleIOException(request, ioe, null);
-    }
-    return null;
-  }
-
-  private void handleNotLeaderException(RaftClientRequest request, NotLeaderException nle) {
-    refreshPeers(nle.getPeers());
-    final String newLeader = nle.getSuggestedLeader() == null? null
-        : nle.getSuggestedLeader().getId();
-    handleIOException(request, nle, newLeader);
-  }
-
-  private void refreshPeers(RaftPeer[] newPeers) {
-    if (newPeers != null && newPeers.length > 0) {
-      peers.clear();
-      for (RaftPeer p : newPeers) {
-        peers.put(p.getId(), p);
-      }
-      // also refresh the rpc proxies for these peers
-      requestSender.addServers(Arrays.asList(newPeers));
-    }
-  }
-
-  private void handleIOException(RaftClientRequest request, IOException ioe, String newLeader) {
-    LOG.debug("{}: Failed with {}", clientId, ioe);
-    final String oldLeader = request.getReplierId();
-    if (newLeader == null && oldLeader.equals(leaderId)) {
-      newLeader = StringUtils.next(oldLeader, peers.keySet());
-    }
-    if (newLeader != null && oldLeader.equals(leaderId)) {
-      LOG.debug("{}: change Leader from {} to {}", clientId, oldLeader, newLeader);
-      this.leaderId = newLeader;
-    }
-  }
-
-  @VisibleForTesting
-  public RaftClientRequestSender getRequestSender() {
-    return requestSender;
-  }
-
-  @Override
-  public void close() throws IOException {
-    requestSender.close();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/raft-common/RaftCommon.cmake
----------------------------------------------------------------------
diff --git a/raft-common/RaftCommon.cmake b/raft-common/RaftCommon.cmake
deleted file mode 100644
index 61d2d5a..0000000
--- a/raft-common/RaftCommon.cmake
+++ /dev/null
@@ -1,208 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#
-# Common CMake utilities and configuration, shared by all Native components.
-#
-
-#
-# Platform-specific prerequisite checks.
-#
-
-if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
-    # Only 64-bit Java is supported.
-    if(NOT JVM_ARCH_DATA_MODEL EQUAL 64)
-        message(FATAL_ERROR "Unrecognised JVM_ARCH_DATA_MODEL '${JVM_ARCH_DATA_MODEL}'. "
-          "A 64-bit JVM must be used on Solaris, make sure that one is installed and, "
-          "if necessary, the MAVEN_OPTS environment variable includes '-d64'")
-    endif()
-
-    # Only gcc is suported for now.
-    if(NOT(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX))
-        message(FATAL_ERROR "Only gcc is supported on Solaris")
-    endif()
-endif()
-
-#
-# Helper functions and macros.
-#
-
-# Add flags to all the CMake compiler variables
-macro(raft_add_compiler_flags FLAGS)
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLAGS}")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS}")
-endmacro()
-
-# Add flags to all the CMake linker variables.
-macro(raft_add_linker_flags FLAGS)
-    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FLAGS}")
-    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FLAGS}")
-endmacro()
-
-# Compile a library with both shared and static variants.
-function(raft_add_dual_library LIBNAME)
-    add_library(${LIBNAME} SHARED ${ARGN})
-    add_library(${LIBNAME}_static STATIC ${ARGN})
-    set_target_properties(${LIBNAME}_static PROPERTIES OUTPUT_NAME ${LIBNAME})
-endfunction()
-
-# Link both a static and a dynamic target against some libraries.
-function(raft_target_link_dual_libraries LIBNAME)
-    target_link_libraries(${LIBNAME} ${ARGN})
-    target_link_libraries(${LIBNAME}_static ${ARGN})
-endfunction()
-
-# Set all the output directories to the same place.
-function(raft_output_directory TGT DIR)
-    set_target_properties(${TGT} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DIR}")
-    set_target_properties(${TGT} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DIR}")
-    set_target_properties(${TGT} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DIR}")
-endfunction()
-
-# Set the target directories for dynamic and static builds.
-function(raft_dual_output_directory TGT DIR)
-    raft_output_directory(${TGT} "${DIR}")
-    raft_output_directory(${TGT}_static "${DIR}")
-endfunction()
-
-# Alter the behavior of find_package and find_library so that we find only
-# shared libraries with a given version suffix.  You should save
-# CMAKE_FIND_LIBRARY_SUFFIXES before calling this function and restore it
-# afterwards.  On Windows this function is a no-op.  Windows does not encode
-# version number information information into library path names.
-macro(raft_set_find_shared_library_version LVERS)
-    if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-        # Mac OS uses .dylib
-        set(CMAKE_FIND_LIBRARY_SUFFIXES ".${LVERS}.dylib")
-    elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
-        # FreeBSD has always .so installed.
-        set(CMAKE_FIND_LIBRARY_SUFFIXES ".so")
-    elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
-        # Windows doesn't support finding shared libraries by version.
-    else()
-        # Most UNIX variants use .so
-        set(CMAKE_FIND_LIBRARY_SUFFIXES ".so.${LVERS}")
-    endif()
-endmacro()
-
-# Alter the behavior of find_package and find_library so that we find only
-# shared libraries without any version suffix.  You should save
-# CMAKE_FIND_LIBRARY_SUFFIXES before calling this function and restore it
-# afterwards. On Windows this function is a no-op.  Windows does not encode
-# version number information information into library path names.
-macro(raft_set_find_shared_library_without_version)
-    if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-        # Mac OS uses .dylib
-        set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib")
-    elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
-        # No effect
-    else()
-        # Most UNIX variants use .so
-        set(CMAKE_FIND_LIBRARY_SUFFIXES ".so")
-    endif()
-endmacro()
-
-#
-# Configuration.
-#
-
-# Initialise the shared gcc/g++ flags if they aren't already defined.
-if(NOT DEFINED GCC_SHARED_FLAGS)
-    set(GCC_SHARED_FLAGS "-g -O2 -Wall -pthread -D_FILE_OFFSET_BITS=64")
-endif()
-
-# Add in support other compilers here, if necessary,
-# the assumption is that GCC or a GCC-compatible compiler is being used.
-
-# Set the shared GCC-compatible compiler and linker flags.
-raft_add_compiler_flags("${GCC_SHARED_FLAGS}")
-raft_add_linker_flags("${LINKER_SHARED_FLAGS}")
-
-#
-# Linux-specific configuration.
-#
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-    # Make GNU extensions available.
-    raft_add_compiler_flags("-D_GNU_SOURCE")
-
-    # If JVM_ARCH_DATA_MODEL is 32, compile all binaries as 32-bit.
-    if(JVM_ARCH_DATA_MODEL EQUAL 32)
-        # Force 32-bit code generation on amd64/x86_64, ppc64, sparc64
-        if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_PROCESSOR MATCHES ".*64")
-            raft_add_compiler_flags("-m32")
-            raft_add_linker_flags("-m32")
-        endif()
-        # Set CMAKE_SYSTEM_PROCESSOR to ensure that find_package(JNI) will use 32-bit libraries
-        if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
-            set(CMAKE_SYSTEM_PROCESSOR "i686")
-        endif()
-    endif()
-
-    # Determine float ABI of JVM on ARM.
-    if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
-        find_program(READELF readelf)
-        if(READELF MATCHES "NOTFOUND")
-            message(WARNING "readelf not found; JVM float ABI detection disabled")
-        else(READELF MATCHES "NOTFOUND")
-            execute_process(
-                COMMAND ${READELF} -A ${JAVA_JVM_LIBRARY}
-                OUTPUT_VARIABLE JVM_ELF_ARCH
-                ERROR_QUIET)
-            if(NOT JVM_ELF_ARCH MATCHES "Tag_ABI_VFP_args: VFP registers")
-                # Test compilation with -mfloat-abi=softfp using an arbitrary libc function
-                # (typically fails with "fatal error: bits/predefs.h: No such file or directory"
-                # if soft-float dev libraries are not installed)
-                message("Soft-float JVM detected")
-                include(CMakePushCheckState)
-                cmake_push_check_state()
-                set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -mfloat-abi=softfp")
-                include(CheckSymbolExists)
-                check_symbol_exists(exit stdlib.h SOFTFP_AVAILABLE)
-                if(NOT SOFTFP_AVAILABLE)
-                    message(FATAL_ERROR "Soft-float dev libraries required (e.g. 'apt-get install libc6-dev-armel' on Debian/Ubuntu)")
-                endif()
-                cmake_pop_check_state()
-                raft_add_compiler_flags("-mfloat-abi=softfp")
-            endif()
-        endif()
-    endif()
-
-#
-# Solaris-specific configuration.
-#
-elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
-    # Solaris flags. 64-bit compilation is mandatory, and is checked earlier.
-    raft_add_compiler_flags("-m64 -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS")
-    set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
-    set(CMAKE_CXX_FLAGS "-std=gnu++98 ${CMAKE_CXX_FLAGS}")
-    raft_add_linker_flags("-m64")
-
-    # CMAKE_SYSTEM_PROCESSOR is set to the output of 'uname -p', which on Solaris is
-    # the 'lowest' ISA supported, i.e. 'i386' or 'sparc'. However in order for the
-    # standard CMake modules to look in the right places it needs to reflect the required
-    # compilation mode, i.e. 64 bit. We therefore force it to either 'amd64' or 'sparcv9'.
-    if(CMAKE_SYSTEM_PROCESSOR STREQUAL "i386")
-        set(CMAKE_SYSTEM_PROCESSOR "amd64")
-        set(CMAKE_LIBRARY_ARCHITECTURE "amd64")
-    elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "sparc")
-        set(CMAKE_SYSTEM_PROCESSOR "sparcv9")
-        set(CMAKE_LIBRARY_ARCHITECTURE "sparcv9")
-    else()
-        message(FATAL_ERROR "Unrecognised CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}")
-    endif()
-endif()

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/raft-common/RaftJNI.cmake
----------------------------------------------------------------------
diff --git a/raft-common/RaftJNI.cmake b/raft-common/RaftJNI.cmake
deleted file mode 100644
index 78d7ffd..0000000
--- a/raft-common/RaftJNI.cmake
+++ /dev/null
@@ -1,97 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#
-# Common JNI detection for CMake, shared by all Native components.
-#
-
-# Check the JVM_ARCH_DATA_MODEL variable as been set to 32 or 64 by maven.
-if(NOT DEFINED JVM_ARCH_DATA_MODEL)
-    message(FATAL_ERROR "JVM_ARCH_DATA_MODEL is not defined")
-elseif(NOT (JVM_ARCH_DATA_MODEL EQUAL 32 OR JVM_ARCH_DATA_MODEL EQUAL 64))
-    message(FATAL_ERROR "JVM_ARCH_DATA_MODEL is not 32 or 64")
-endif()
-
-#
-# Linux-specific JNI configuration.
-#
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-    # Locate JNI_INCLUDE_DIRS and JNI_LIBRARIES.
-    # Since we were invoked from Maven, we know that the JAVA_HOME environment
-    # variable is valid.  So we ignore system paths here and just use JAVA_HOME.
-    file(TO_CMAKE_PATH "$ENV{JAVA_HOME}" _java_home)
-    if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
-        set(_java_libarch "i386")
-    elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
-        set(_java_libarch "amd64")
-    elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
-        set(_java_libarch "arm")
-    elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64le")
-        if(EXISTS "${_java_home}/jre/lib/ppc64le")
-            set(_java_libarch "ppc64le")
-        else()
-            set(_java_libarch "ppc64")
-        endif()
-    else()
-        set(_java_libarch ${CMAKE_SYSTEM_PROCESSOR})
-    endif()
-    set(_JDK_DIRS "${_java_home}/jre/lib/${_java_libarch}/*"
-                  "${_java_home}/jre/lib/${_java_libarch}"
-                  "${_java_home}/jre/lib/*"
-                  "${_java_home}/jre/lib"
-                  "${_java_home}/lib/*"
-                  "${_java_home}/lib"
-                  "${_java_home}/include/*"
-                  "${_java_home}/include"
-                  "${_java_home}"
-    )
-    find_path(JAVA_INCLUDE_PATH
-        NAMES jni.h
-        PATHS ${_JDK_DIRS}
-        NO_DEFAULT_PATH)
-    #In IBM java, it's jniport.h instead of jni_md.h
-    find_path(JAVA_INCLUDE_PATH2
-        NAMES jni_md.h jniport.h
-        PATHS ${_JDK_DIRS}
-        NO_DEFAULT_PATH)
-    set(JNI_INCLUDE_DIRS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
-    find_library(JAVA_JVM_LIBRARY
-        NAMES jvm JavaVM
-        PATHS ${_JDK_DIRS}
-        NO_DEFAULT_PATH)
-    set(JNI_LIBRARIES ${JAVA_JVM_LIBRARY})
-    unset(_java_libarch)
-    unset(_java_home)
-
-    message("JAVA_HOME=${JAVA_HOME}, JAVA_JVM_LIBRARY=${JAVA_JVM_LIBRARY}")
-    message("JAVA_INCLUDE_PATH=${JAVA_INCLUDE_PATH}, JAVA_INCLUDE_PATH2=${JAVA_INCLUDE_PATH2}")
-    if(JAVA_JVM_LIBRARY AND JAVA_INCLUDE_PATH AND JAVA_INCLUDE_PATH2)
-        message("Located all JNI components successfully.")
-    else()
-        message(FATAL_ERROR "Failed to find a viable JVM installation under JAVA_HOME.")
-    endif()
-
-    # Use the standard FindJNI module to locate the JNI components.
-    find_package(JNI REQUIRED)
-
-#
-# Otherwise, use the standard FindJNI module to locate the JNI components.
-#
-else()
-    find_package(JNI REQUIRED)
-endif()

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/raft-common/pom.xml
----------------------------------------------------------------------
diff --git a/raft-common/pom.xml b/raft-common/pom.xml
deleted file mode 100644
index d9c3d12..0000000
--- a/raft-common/pom.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License. See accompanying LICENSE file.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <artifactId>raft-project-dist</artifactId>
-    <groupId>com.hortonworks.raft</groupId>
-    <version>1.0-SNAPSHOT</version>
-    <relativePath>../raft-project-dist</relativePath>
-  </parent>
-
-  <artifactId>raft-common</artifactId>
-  <name>Raft Common</name>
-
-  <dependencies>
-    <dependency>
-      <artifactId>raft-proto-shaded</artifactId>
-      <groupId>com.hortonworks.raft</groupId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <profiles>
-    <profile>
-      <id>native</id>
-      <activation>
-        <activeByDefault>false</activeByDefault>
-      </activation>
-      <properties>
-        <runningWithNative>true</runningWithNative>
-      </properties>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-enforcer-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>enforce-os</id>
-                <goals>
-                  <goal>enforce</goal>
-                </goals>
-                <configuration>
-                  <rules>
-                    <requireOS>
-                      <family>mac</family>
-                      <family>unix</family>
-                      <message>native build only supported on Mac or Unix</message>
-                    </requireOS>
-                  </rules>
-                  <fail>true</fail>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>native-maven-plugin</artifactId>
-            <executions>
-              <execution>
-                <phase>compile</phase>
-                <goals>
-                  <goal>javah</goal>
-                </goals>
-                <configuration>
-                  <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
-                  <javahClassNames>
-                    <javahClassName>org.apache.raft.io.nativeio.NativeIO</javahClassName>
-                    <javahClassName>org.apache.raft.util.NativeCrc32</javahClassName>
-                  </javahClassNames>
-                  <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-maven-plugins</artifactId>
-            <executions>
-              <execution>
-                <id>cmake-compile</id>
-                <phase>compile</phase>
-                <goals><goal>cmake-compile</goal></goals>
-                <configuration>
-                  <source>${basedir}/src</source>
-                  <vars>
-                    <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
-                    <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
-                  </vars>
-                </configuration>
-              </execution>
-              <execution>
-                <id>test_bulk_crc32</id>
-                <goals><goal>cmake-test</goal></goals>
-                <phase>test</phase>
-                <configuration>
-                  <binary>${project.build.directory}/native/test_bulk_crc32</binary>
-                  <timeout>1200</timeout>
-                  <results>${project.build.directory}/native-results</results>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/raft-common/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/raft-common/src/CMakeLists.txt b/raft-common/src/CMakeLists.txt
deleted file mode 100644
index 9e5c766..0000000
--- a/raft-common/src/CMakeLists.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#
-# CMake configuration.
-#
-
-cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
-
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/..)
-include(RaftCommon)
-
-# Source and test locations.
-set(SRC main/native/src/org/apache/raft)
-set(TST main/native/src/test/org/apache/raft)
-
-#
-# Main configuration.
-#
-
-# The caller must specify where the generated headers have been placed.
-if(NOT GENERATED_JAVAH)
-    message(FATAL_ERROR "You must set the CMake variable GENERATED_JAVAH")
-endif()
-
-# Configure JNI.
-include(RaftJNI)
-
-# Build hardware CRC32 acceleration, if supported on the platform.
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
-  set(BULK_CRC_ARCH_SOURCE_FIlE "${SRC}/util/bulk_crc32_x86.c")
-elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
-  set(BULK_CRC_ARCH_SOURCE_FIlE "${SRC}/util/bulk_crc32_aarch64.c")
-else()
-  message("No HW CRC acceleration for ${CMAKE_SYSTEM_PROCESSOR}, falling back to SW")
-endif()
-
-# Check for platform-specific functions and libraries.
-include(CheckFunctionExists)
-include(CheckLibraryExists)
-check_function_exists(sync_file_range HAVE_SYNC_FILE_RANGE)
-check_function_exists(posix_fadvise HAVE_POSIX_FADVISE)
-check_library_exists(dl dlopen "" NEED_LINK_DL)
-
-# Configure the build.
-include_directories(
-    ${GENERATED_JAVAH}
-    main/native/src
-    ${CMAKE_CURRENT_SOURCE_DIR}
-    ${CMAKE_CURRENT_SOURCE_DIR}/src
-    ${CMAKE_BINARY_DIR}
-    ${JNI_INCLUDE_DIRS}
-    ${SRC}/util
-)
-configure_file(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
-
-set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
-raft_add_dual_library(raft
-    main/native/src/exception.c
-    ${SRC}/io/nativeio/NativeIO.c
-    ${SRC}/io/nativeio/errno_enum.c
-    ${SRC}/io/nativeio/file_descriptor.c
-    ${SRC}/util/NativeCodeLoader.c
-    ${SRC}/util/NativeCrc32.c
-    ${SRC}/util/bulk_crc32.c
-    ${BULK_CRC_ARCH_SOURCE_FIlE}
-)
-if(NEED_LINK_DL)
-   set(LIB_DL dl)
-endif()
-
-raft_target_link_dual_libraries(raft ${LIB_DL} ${JAVA_JVM_LIBRARY})
-set(LIBRAFT_VERSION "1.0.0")
-set_target_properties(raft PROPERTIES SOVERSION ${LIBRAFT_VERSION})
-raft_dual_output_directory(raft target/usr/local/lib)
-
-# By embedding '$ORIGIN' into the RPATH of libraft.so, dlopen will look in
-# the directory containing libraft.so. However, $ORIGIN is not supported by
-# all operating systems.
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|SunOS")
-    set(RPATH "\$ORIGIN/")
-    if(EXTRA_LIBRAFT_RPATH)
-        set(RPATH "${RPATH}:${EXTRA_LIBRAFT_RPATH}/")
-    endif()
-    set_target_properties(raft PROPERTIES INSTALL_RPATH "${RPATH}")
-endif()
-
-# Build the CRC32 test executable.
-add_executable(test_bulk_crc32
-    ${SRC}/util/bulk_crc32.c
-    ${BULK_CRC_ARCH_SOURCE_FIlE}
-    ${TST}/util/test_bulk_crc32.c
-)

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/raft-common/src/config.h.cmake
----------------------------------------------------------------------
diff --git a/raft-common/src/config.h.cmake b/raft-common/src/config.h.cmake
deleted file mode 100644
index 709fc75..0000000
--- a/raft-common/src/config.h.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#cmakedefine HAVE_SYNC_FILE_RANGE
-#cmakedefine HAVE_POSIX_FADVISE
-
-#endif

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/7e71a2e0/raft-common/src/main/conf/log4j.properties
----------------------------------------------------------------------
diff --git a/raft-common/src/main/conf/log4j.properties b/raft-common/src/main/conf/log4j.properties
deleted file mode 100644
index 5d16991..0000000
--- a/raft-common/src/main/conf/log4j.properties
+++ /dev/null
@@ -1,74 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Define some default values that can be overridden by system properties
-raft.root.logger=INFO,console
-raft.log.dir=.
-raft.log.file=raft.log
-
-# Define the root logger to the system property "raft.root.logger".
-log4j.rootLogger=${raft.root.logger}
-
-# Logging Threshold
-log4j.threshold=ALL
-
-# Null Appender
-log4j.appender.NullAppender=org.apache.log4j.varia.NullAppender
-
-#
-# Rolling File Appender - cap space usage at 5gb.
-#
-raft.log.maxfilesize=256MB
-raft.log.maxbackupindex=20
-log4j.appender.RFA=org.apache.log4j.RollingFileAppender
-log4j.appender.RFA.File=${raft.log.dir}/${raft.log.file}
-
-log4j.appender.RFA.MaxFileSize=${raft.log.maxfilesize}
-log4j.appender.RFA.MaxBackupIndex=${raft.log.maxbackupindex}
-
-log4j.appender.RFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
-# Debugging Pattern format
-#log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
-
-
-#
-# Daily Rolling File Appender
-#
-log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.DRFA.File=${raft.log.dir}/${raft.log.file}
-
-# Rollover at midnight
-log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-
-log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
-# Debugging Pattern format
-#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
-
-
-#
-# console
-# Add "console" to rootlogger above if you want to use this
-#
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.target=System.err
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n