zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] maoling commented on a change in pull request #1052: ZOOKEEPER-3502:improve the server command: zabstate to have a better observation on the process of leader election
Date Mon, 12 Aug 2019 02:58:37 GMT
maoling commented on a change in pull request #1052: ZOOKEEPER-3502:improve the server command:
zabstate to have a better observation on the process of leader election
URL: https://github.com/apache/zookeeper/pull/1052#discussion_r312770854
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/Commands.java
 ##########
 @@ -743,7 +744,14 @@ public CommandResponse run(ZooKeeperServer zkServer, Map<String,
String> kwargs)
                                 && voter.addr.equals(peer.getQuorumAddress())
                                 && voter.electionAddr.equals(peer.getElectionAddress())
                 );
+                response.put("myid", zkServer.getConf().getServerId());
+                response.put("is_leader", zkServer instanceof LeaderZooKeeperServer);
+                response.put("endpoint", peer.getElectionAddress().toString().split(":")[0]+
":" + peer.getClientPort());
 
 Review comment:
   Good catch

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message