This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch 5.1 in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/5.1 by this push: new 05ec08c53d PHOENIX-7686 Fix Registry related regression in 5.1 (#2267) 05ec08c53d is described below commit 05ec08c53d91753481f06a4a1964b3c4e48a22e0 Author: Istvan Toth <st...@apache.org> AuthorDate: Wed Aug 6 17:28:21 2025 +0200 PHOENIX-7686 Fix Registry related regression in 5.1 (#2267) --- .../apache/phoenix/jdbc/AbstractRPCConnectionInfo.java | 4 ++-- .../phoenix/query/ConnectionQueryServicesImpl.java | 4 ++-- .../apache/phoenix/jdbc/PhoenixEmbeddedDriverTest.java | 16 ++++++++++------ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/AbstractRPCConnectionInfo.java b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/AbstractRPCConnectionInfo.java index c478262c7f..9eb867f0a5 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/AbstractRPCConnectionInfo.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/AbstractRPCConnectionInfo.java @@ -34,8 +34,8 @@ import org.apache.hbase.thirdparty.com.google.common.base.Strings; */ public abstract class AbstractRPCConnectionInfo extends ConnectionInfo { - protected static final String MASTER_ADDRS_KEY = "hbase.masters"; - protected static final String MASTER_HOSTNAME_KEY = "hbase.master.hostname"; + public static final String MASTER_ADDRS_KEY = "hbase.masters"; + public static final String MASTER_HOSTNAME_KEY = "hbase.master.hostname"; protected String bootstrapServers; diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java index 47eab216a1..b6fa1729dc 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java @@ -435,8 +435,8 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices HConstants.CLIENT_ZOOKEEPER_CLIENT_PORT, this.config.get(HConstants.CLIENT_ZOOKEEPER_CLIENT_PORT), HConstants.ZOOKEEPER_CLIENT_PORT, this.config.get(HConstants.ZOOKEEPER_CLIENT_PORT), RPCConnectionInfo.BOOTSTRAP_NODES, - this.config.get(RPCConnectionInfo.BOOTSTRAP_NODES), HConstants.MASTER_ADDRS_KEY, - this.config.get(HConstants.MASTER_ADDRS_KEY), + this.config.get(RPCConnectionInfo.BOOTSTRAP_NODES), RPCConnectionInfo.MASTER_ADDRS_KEY, + this.config.get(RPCConnectionInfo.MASTER_ADDRS_KEY), ConnectionInfo.CLIENT_CONNECTION_REGISTRY_IMPL_CONF_KEY, this.config.get(ConnectionInfo.CLIENT_CONNECTION_REGISTRY_IMPL_CONF_KEY)); diff --git a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriverTest.java b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriverTest.java index f5df907b13..a23626ed58 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriverTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriverTest.java @@ -483,11 +483,15 @@ public class PhoenixEmbeddedDriverTest { assertEquals("127.23.45.678:12345,host987:12345,localhost:12345,v3:12345", props.get(HConstants.CLIENT_ZOOKEEPER_QUORUM)); - connectionInfo = ConnectionInfo.create("jdbc:phoenix+rpc:" - + "localhost\\:2181,127.23.45.678\\:7634,v3\\:1,host123.48576\\:723::;" + "test=true", null, - null); - props = connectionInfo.asProps(); - assertNull(props.get(HConstants.ZOOKEEPER_QUORUM)); - assertNull(props.get(HConstants.CLIENT_ZOOKEEPER_QUORUM)); + if (VersionInfo.compareVersion(VersionInfo.getVersion(), "2.5.0") >= 0) { + connectionInfo = + ConnectionInfo.create( + "jdbc:phoenix+rpc:" + + "localhost\\:2181,127.23.45.678\\:7634,v3\\:1,host123.48576\\:723::;" + "test=true", + null, null); + props = connectionInfo.asProps(); + assertNull(props.get(HConstants.ZOOKEEPER_QUORUM)); + assertNull(props.get(HConstants.CLIENT_ZOOKEEPER_QUORUM)); + } } }