sadanand48 commented on code in PR #3144:
URL: https://github.com/apache/ozone/pull/3144#discussion_r872641109


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsUtils.java:
##########
@@ -614,8 +614,7 @@ public static String format(List<String> nodes) {
     for (String node : nodes) {
       String[] x = node.split(":");
       sb.append(String
-          .format("{ HostName : %s, Ratis Port : %s, Role : %s } ", x[0], x[1],
-              x[2]));
+          .format("{ HostName : %s, Ratis Port : %s } ", x[0], x[1]));

Review Comment:
   @ChenSammi Thanks for the review. The format method here is only used in 
StorageContainerManager#getRatisRoles which is an implementation of the 
SCMMXBean (Web UI)
   In case of the ozone admin scm getroles command, it creates an SCMClient and 
calls SCMClient#getRatisRoles which creates an scm client and does an RPC which 
is executed only by leader.
   The SCMContext of an SCM only knows whether itself is a leader or not, If 
its not a leader, then we don’t know which one is the leader without doing an 
RPC.



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