You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/03/03 09:08:19 UTC

[GitHub] [ozone] GlenGeng commented on a change in pull request #1981: HDDS-4890. SCM Ratis enable/disable switch

GlenGeng commented on a change in pull request #1981:
URL: https://github.com/apache/ozone/pull/1981#discussion_r586238055



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/MockSCMHAManager.java
##########
@@ -204,32 +199,29 @@ private Message process(final SCMRatisRequest request)
       }
     }
 
-    @Override
-    public void stop() {
+    @Override public void stop() {
     }
 
-    @Override
-    public RaftServer.Division getDivision() {
+    @Override public RaftServer.Division getDivision() {
       return null;
     }
 
-    @Override
-    public List<String> getRatisRoles() {
-      return Arrays.asList(
-          "180.3.14.5:9865",
-          "180.3.14.21:9865",
-          "180.3.14.145:9865");
+    @Override public List<String> getRatisRoles() {

Review comment:
       The code style is weird, why put override and function name in the same line ?

##########
File path: hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/scm/metadata/SCMDBTransactionBufferImpl.java
##########
@@ -0,0 +1,34 @@
+
+
+package org.apache.hadoop.hdds.scm.metadata;
+
+import org.apache.hadoop.hdds.utils.db.Table;
+
+import java.io.IOException;
+
+/**
+ * Default implementation for DBTransactionBuffer for SCM without Ratis.
+ */
+public class SCMDBTransactionBufferImpl implements DBTransactionBuffer {
+
+  public SCMDBTransactionBufferImpl() {
+
+  }
+
+  @Override
+  public void addToBuffer(Table table, Object key, Object value)
+      throws IOException {
+    table.put(key, value);

Review comment:
       Quite straightforward, I like it.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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