amaliujia commented on a change in pull request #1916:
URL: https://github.com/apache/ozone/pull/1916#discussion_r574009330



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHANodeDetails.java
##########
@@ -166,7 +168,7 @@ public static SCMHANodeDetails 
loadSCMHAConfig(OzoneConfiguration conf)
         }
 
         if (addr.isUnresolved()) {
-          LOG.error("Address for OM {} : {} couldn't be resolved. Proceeding " 
+
+          LOG.error("Address for SCM {} : {} couldn't be resolved. Proceeding 
" +

Review comment:
       O nice catch :)

##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/RatisUtil.java
##########
@@ -74,15 +74,19 @@ public static RaftProperties newRaftProperties(
   public static void setRaftStorageDir(final RaftProperties properties,
                                        final SCMHAConfiguration haConf,
                                        final ConfigurationSource conf) {
+    RaftServerConfigKeys.setStorageDir(properties,
+        Collections.singletonList(new File(getRatisStorageDir(haConf, conf))));
+  }
+
+  public static String getRatisStorageDir(final SCMHAConfiguration haConf,
+      final ConfigurationSource conf) {
     String storageDir = haConf.getRatisStorageDir();
     if (Strings.isNullOrEmpty(storageDir)) {
       File metaDirPath = ServerUtils.getOzoneMetaDirPath(conf);
       storageDir = (new File(metaDirPath, "scm-ha")).getPath();
     }
-    RaftServerConfigKeys.setStorageDir(properties,
-        Collections.singletonList(new File(storageDir)));
+    return storageDir;
   }
-

Review comment:
       nit: undo this line




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to