Github user hanm commented on a diff in the pull request:
https://github.com/apache/curator/pull/205#discussion_r127124498
--- Diff:
curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java
---
@@ -166,12 +166,26 @@ public static String
configToConnectionString(QuorumVerifier data) throws Except
StringBuilder sb = new StringBuilder();
for ( QuorumPeer.QuorumServer server :
data.getAllMembers().values() )
{
+ if ( server.clientAddr == null )
+ {
+ // Invalid client address configuration in zoo.cfg
+ continue;
--- End diff --
I see what you mean - if the client_port_address is not present ZK will not
initialize server.clientAddress, which is where you extract the client port.
This is not a problem for ZK itself because it has the knowledge of clientPort
of a quorum peer which is not publicly accessible.
I think QuorumSever can provide APIs so you guys can use the APIs to get
the client / server address / port rather than relying on the clientAddr etc
fields. Before that happens it's fine to skip as there is no way to extract the
client port (and I think that only happens when clientAddress is not explicitly
present in the config string - cases like server.1= 125.23.63.23:1234:1235;1236)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---