You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "dombizita (via GitHub)" <gi...@apache.org> on 2024/08/23 10:20:11 UTC

Re: [PR] HDDS-11196. Improve SCM WebUI Display. [ozone]

dombizita commented on code in PR #6960:
URL: https://github.com/apache/ozone/pull/6960#discussion_r1728724730


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java:
##########
@@ -2136,6 +2136,23 @@ public String getScmRatisRoles() {
         HddsUtils.format(server.getRatisRoles()) : "STANDALONE";
   }
 
+  @Override
+  public List<List<String>> getRatisRoles() {
+    final SCMRatisServer server = getScmHAManager().getRatisServer();
+    List<String> ratisRoles = server.getRatisRoles();
+    List<List<String>> result = new ArrayList<>();
+    for (String role : ratisRoles) {
+      String[] roleArr = role.split(":");
+      List<String> scmInfo = new ArrayList<>();
+      scmInfo.add(roleArr[0]);
+      scmInfo.add(roleArr[3]);
+      scmInfo.add(roleArr[1]);
+      scmInfo.add(roleArr[2]);
+      result.add(scmInfo);
+    }

Review Comment:
   Agree, this should be handled, like it is for OM. https://github.com/apache/ozone/blob/c77115abd15778e9d4f00ec32d8d2b7a4a2ee670/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java#L3076-L3099 



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