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



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java
##########
@@ -713,9 +704,12 @@ public static boolean scmInit(OzoneConfiguration conf,
             scmStorageConfig.getLayoutVersion());
         //TODO: this check need not be done if ratis is not used.

Review comment:
       Minor: confusing, can we remove the TODO?
   As we start SCM Ratis Server only when ratis is enabled, that checks makes 
it clear.

##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java
##########
@@ -80,13 +80,18 @@ public SCMStateMachine(final StorageContainerManager scm,
     }
   }
 
+  public SCMStateMachine() {

Review comment:
       Instead of doing this, can we create StateMachinee Object like normal 
creation flow, so that we don' need to add any null checks, as all objects will 
be null.
   
   I see from code to do this, we need to create metadata store and SCM, do you 
think we need to do this way, to handle any NPE, if any other method is called.




----------------------------------------------------------------
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