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 2022/05/13 17:50:37 UTC

[GitHub] [ozone] sadanand48 commented on a diff in pull request #3144: HDDS-6383. SCM Web UI doesn’t show correct leader/follower HA info

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: issues-unsubscribe@ozone.apache.org

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