xiaoyuyao commented on a change in pull request #1191:
URL: https://github.com/apache/hadoop-ozone/pull/1191#discussion_r461111835



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAManagerImpl.java
##########
@@ -67,6 +101,44 @@ public SCMRatisServer getRatisServer() {
     return ratisServer;
   }
 
+  private RaftPeerId getPeerIdFromRoleInfo(RaftServerImpl serverImpl) {
+    if (serverImpl.isLeader()) {
+      return RaftPeerId.getRaftPeerId(
+          serverImpl.getRoleInfoProto().getLeaderInfo().toString());
+    } else if (serverImpl.isFollower()) {
+      return RaftPeerId.getRaftPeerId(
+          serverImpl.getRoleInfoProto().getFollowerInfo()
+              .getLeaderInfo().getId().getAddress());

Review comment:
       getId().getAddress() seems unnecessary.




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

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