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