zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] eolivelli 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 Sun, 11 Aug 2019 10:46:58 GMT
eolivelli 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_r312733261
 
 

 ##########
 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);
 
 Review comment:
   We' better not use 'instanceof', can you please add a method to the base class and implement
it with a default value of 'false'?
   
   

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