You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Li Wang (Jira)" <ji...@apache.org> on 2025/09/29 19:56:00 UTC
[jira] [Comment Edited] (ZOOKEEPER-4982) Automatic HostProvider selection based on connection string format
[ https://issues.apache.org/jira/browse/ZOOKEEPER-4982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18022981#comment-18022981 ]
Li Wang edited comment on ZOOKEEPER-4982 at 9/29/25 7:55 PM:
-------------------------------------------------------------
# HostProviderFactory: New factory class that checks connection strings and instantiates appropriate HostProvider
** DNS SRV format (e.g., "_zookeeper._tcp.example.com") → DnsSrvHostProvider
** Traditional format (e.g., "server1:2181,server2:2181") → StaticHostProvider
# ConnectStringParser Enhancement: Extended to detect and validate DNS SRV connection string formats
# ZooKeeper Constructor Integration: Updated ZooKeeper constructors to use HostProviderFactory for automatic provider creation
was (Author: liwang):
# HostProviderFactory: New factory class that checks connection strings and instantiates appropriate HostProvider
** DNS SRV format (e.g., "_zookeeper._tcp.example.com") → DnsSrvHostProvider
** Traditional format (e.g., "server1:2181,server2:2181") → StaticHostProvider
# ConnectStringParser Enhancement: Extended to detect and validate DNS SRV connection string formats
# ZooKeeper Constructor Integration: Updated ZooKeeper constructors to use HostProviderFactory for automatic provider creation
> Automatic HostProvider selection based on connection string format
> ------------------------------------------------------------------
>
> Key: ZOOKEEPER-4982
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4982
> Project: ZooKeeper
> Issue Type: New Feature
> Components: java client
> Reporter: Li Wang
> Priority: Major
> Fix For: 3.10.0
>
>
> Enhance ZooKeeper Java client to automatically detect connection string format and select appropriate HostProvider, enabling zero-code-change migration from static to DNS SRV-based service discovery.
> Following ZOOKEEPER-4956, applications must explicitly choose between StaticHostProvider and DnsSrvHostProvider. This ticket enables automatic provider selection based on connection string format, allowing seamless migration without code changes.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)