ChenSammi commented on code in PR #7145:
URL: https://github.com/apache/ozone/pull/7145#discussion_r1768224939


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/HddsDispatcher.java:
##########
@@ -647,12 +647,10 @@ public Handler getHandler(ContainerProtos.ContainerType 
containerType) {
 
   @Override
   public void setClusterId(String clusterId) {
-    Preconditions.checkNotNull(clusterId, "clusterId Cannot be null");
-    if (this.clusterId == null) {
-      this.clusterId = clusterId;
-      for (Map.Entry<ContainerType, Handler> handlerMap : handlers.entrySet()) 
{
-        handlerMap.getValue().setClusterID(clusterId);
-      }
+    Preconditions.checkNotNull(clusterId, "clusterId cannot be null");

Review Comment:
   I see. Let's keep the typo change. 
   It's expected that only one clusterId is valid during the DN lifetime, that 
clusterId is returned from SCM after DN registered to the SCM.  So I will 
prefer keep the clusterId null check here. 



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

To unsubscribe, e-mail: [email protected]

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