qian0817 commented on PR #852:
URL: https://github.com/apache/ratis/pull/852#issuecomment-1467410299

   Thank you for your answer. I tried and was able to obtain information about 
the roles of all current nodes through the following method.
   
   ```java
   GroupInfoReply groupInfoReply = 
client.getGroupManagementApi(client.getLeaderId())
           .info(Constants.RAFT_GROUP.getGroupId());
   for (RaftPeer peer : groupInfoReply.getGroup().getPeers()) {
     GroupInfoReply reply = client.getGroupManagementApi(peer.getId())
         .info(Constants.RAFT_GROUP.getGroupId());
     System.out.println(peer.getId() + ": " + 
reply.getRoleInfoProto().getRole());
   }
   
   ```


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

Reply via email to