This is an automated email from the ASF dual-hosted git repository. sammichen pushed a commit to branch ozone-0.6.0 in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
commit f58883ba8c036f1385901afa94fa22667669557b Author: Lokesh Jain <[email protected]> AuthorDate: Tue Jul 21 14:47:46 2020 +0530 Update ratis to 1.0.0 (#1222) (cherry picked from commit fb2649e146f068318f628867f7ef1326906f6d92) --- .../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: [email protected] For additional commands, e-mail: [email protected]
