You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by sa...@apache.org on 2020/07/21 09:17:54 UTC

[hadoop-ozone] branch master updated: Update ratis to 1.0.0 (#1222)

This is an automated email from the ASF dual-hosted git repository.

sammichen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new fb2649e  Update ratis to 1.0.0 (#1222)
fb2649e is described below

commit fb2649e146f068318f628867f7ef1326906f6d92
Author: Lokesh Jain <lj...@apache.org>
AuthorDate: Tue Jul 21 14:47:46 2020 +0530

    Update ratis to 1.0.0 (#1222)
---
 .../common/transport/server/ratis/ContainerStateMachine.java | 12 ++++++------
 pom.xml                                                      |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
index b1c8370..840d87c 100644
--- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
+++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
@@ -103,7 +103,7 @@ import org.slf4j.LoggerFactory;
  * processed in 2 phases. The 2 phases are divided in
  * {@link #startTransaction(RaftClientRequest)}, in the first phase the user
  * data is written directly into the state machine via
- * {@link #writeStateMachineData} and in the second phase the
+ * {@link #write} and in the second phase the
  * transaction is committed via {@link #applyTransaction(TransactionContext)}
  *
  * For the requests with no stateMachine data, the transaction is directly
@@ -115,7 +115,7 @@ import org.slf4j.LoggerFactory;
  * the write chunk operation will fail otherwise as the container still hasn't
  * been created. Hence the create container operation has been split in the
  * {@link #startTransaction(RaftClientRequest)}, this will help in synchronizing
- * the calls in {@link #writeStateMachineData}
+ * the calls in {@link #write}
  *
  * 2) Write chunk commit operation is executed after write chunk state machine
  * operation. This will ensure that commit operation is sync'd with the state
@@ -517,7 +517,7 @@ public class ContainerStateMachine extends BaseStateMachine {
    * and also with applyTransaction.
    */
   @Override
-  public CompletableFuture<Message> writeStateMachineData(LogEntryProto entry) {
+  public CompletableFuture<Message> write(LogEntryProto entry) {
     try {
       metrics.incNumWriteStateMachineOps();
       long writeStateMachineStartTime = Time.monotonicNowNanos();
@@ -618,7 +618,7 @@ public class ContainerStateMachine extends BaseStateMachine {
    * @return Combined future of all writeChunks till the log index given.
    */
   @Override
-  public CompletableFuture<Void> flushStateMachineData(long index) {
+  public CompletableFuture<Void> flush(long index) {
     List<CompletableFuture<ContainerCommandResponseProto>> futureList =
         writeChunkFutureMap.entrySet().stream().filter(x -> x.getKey() <= index)
             .map(Map.Entry::getValue).collect(Collectors.toList());
@@ -632,7 +632,7 @@ public class ContainerStateMachine extends BaseStateMachine {
    * evicted.
    */
   @Override
-  public CompletableFuture<ByteString> readStateMachineData(
+  public CompletableFuture<ByteString> read(
       LogEntryProto entry) {
     StateMachineLogEntryProto smLogEntryProto = entry.getStateMachineLogEntry();
     metrics.incNumReadStateMachineOps();
@@ -833,7 +833,7 @@ public class ContainerStateMachine extends BaseStateMachine {
   }
 
   @Override
-  public CompletableFuture<Void> truncateStateMachineData(long index) {
+  public CompletableFuture<Void> truncate(long index) {
     stateMachineDataCache.removeIf(k -> k >= index);
     return CompletableFuture.completedFuture(null);
   }
diff --git a/pom.xml b/pom.xml
index 40f2f58..bcdaf69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,7 +79,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
     <declared.ozone.version>${ozone.version}</declared.ozone.version>
 
     <!-- Apache Ratis version -->
-    <ratis.version>0.6.0-6ab75ae-SNAPSHOT</ratis.version>
+    <ratis.version>1.0.0</ratis.version>
 
     <!-- Apache Ratis thirdparty version -->
     <ratis.thirdparty.version>0.4.0</ratis.thirdparty.version>


---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-commits-help@hadoop.apache.org