-
Notifications
You must be signed in to change notification settings - Fork 7.3k
ZOOKEEPER-4956: Provide a HostProvider that uses DNS SRV record for dynamic server discovery #2320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
anmolnar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are the changes of StaticHostProvider?
zookeeper-server/src/main/java/org/apache/zookeeper/client/DnsSrvHostProvider.java
Outdated
Show resolved
Hide resolved
zookeeper-server/src/main/java/org/apache/zookeeper/client/DnsSrvHostProvider.java
Outdated
Show resolved
Hide resolved
zookeeper-server/src/main/java/org/apache/zookeeper/client/HostConnectionManager.java
Outdated
Show resolved
Hide resolved
zookeeper-server/src/main/java/org/apache/zookeeper/client/HostConnectionManager.java
Show resolved
Hide resolved
I thought it would be better to check in the updated However, I noticed that |
dc2bfe6 to
6e01933
Compare
|
Hi @anmolnar, thanks a lot for your feedback. I've responded to all the comments. Can you please take a look at the updated PR? Thanks. |
6e01933 to
0d6117b
Compare
anmolnar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few more comments, otherwise looks good to me.
| * | ||
| * @return the ConnectionType supported by this provider | ||
| */ | ||
| default ConnectionType getSupportedConnectionType() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do you use this new field? Why is this information important?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed, not needed any more.
zookeeper-server/src/main/java/org/apache/zookeeper/client/HostConnectionManager.java
Show resolved
Hide resolved
| * This is an internal enum used for connection string and provider validation. | ||
| */ | ||
| @InterfaceAudience.Private | ||
| public enum ConnectionType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find usages of this new type in your code.
757b86d to
654c6c1
Compare
|
Please see my comments on the other pr #2321 |
Yes, working on merging #2321 into this one right now. |
d101e10 to
c5449f8
Compare
…ynamic server discovery Author: Li Wang <liwang@apple.com>
c5449f8 to
1c5c292
Compare
The existing ZooKeeper client architecture relies on StaticHostProvider, which lacks auto service discovery capabilities and must wait for external mechanisms to push server list updates, either through manual configuration changes or reconfig notifications.
This PR provides a HostProvider implementation that performs dynamic service discovery based on DNS SRV record. The following is a summary of the changes: