slfan1989 commented on code in PR #6960: URL: https://github.com/apache/ozone/pull/6960#discussion_r1684529728
########## 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: Thank you for review the code! I will continue to improve it. -- 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-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org