zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] symat commented on a change in pull request #1048: ZOOKEEPER-3188: Improve resilience to network
Date Wed, 14 Aug 2019 09:05:30 GMT
symat commented on a change in pull request #1048: ZOOKEEPER-3188: Improve resilience to network
URL: https://github.com/apache/zookeeper/pull/1048#discussion_r313774702
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/Commands.java
 ##########
 @@ -657,11 +647,31 @@ public CommandResponse run(ZooKeeperServer zkServer, Map<String,
String> kwargs)
                                 TreeMap::new));
             }
 
+            private String getMultiAddressString(QuorumPeer.QuorumServer qs) {
+                return qs.addr.getAllAddresses().stream()
+                        .map(address -> getSingleAddressString(qs, address))
+                        .collect(Collectors.joining(","));
+            }
+
+            private String getSingleAddressString(QuorumPeer.QuorumServer qs, InetSocketAddress
address) {
 
 Review comment:
   I changed the format, this is how the `voting_view` admin command responds now (I haven't
push the commit yet):
   ```
   {
     "current_config" : {
       "1" : {
         "server_addresses" : [ "/172.16.101.11:2888", "/172.16.102.11:2888" ],
         "election_addresses" : [ "/172.16.101.11:3888", "/172.16.102.11:3888" ],
         "client_address" : "/0.0.0.0:2181",
         "learner_type" : "participant"
       },
       "2" : {
         "server_addresses" : [ "/172.16.101.22:2888", "/172.16.102.22:2888" ],
         "election_addresses" : [ "/172.16.101.22:3888", "/172.16.102.22:3888" ],
         "client_address" : "/0.0.0.0:2181",
         "learner_type" : "participant"
       },
       "3" : {
         "server_addresses" : [ "/172.16.101.33:2888", "/172.16.102.33:2888" ],
         "election_addresses" : [ "/172.16.101.33:3888", "/172.16.102.33:3888" ],
         "client_address" : "/0.0.0.0:2181",
         "learner_type" : "participant"
       }
     },
     "command" : "voting_view",
     "error" : null
   }
   ```

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