[
https://issues.apache.org/jira/browse/PHOENIX-7537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17932482#comment-17932482
]
Jacob Isaac commented on PHOENIX-7537:
--------------------------------------
Think this is a bug? FYI [~vjasani] [~stoty]
> Well formed URLs created by ZKConnectionInfo.create() throw Malformed
> connection url exception.
> -----------------------------------------------------------------------------------------------
>
> Key: PHOENIX-7537
> URL: https://issues.apache.org/jira/browse/PHOENIX-7537
> Project: Phoenix
> Issue Type: Bug
> Reporter: Jacob Isaac
> Priority: Major
>
> @Test
> public void testMalformedZKConnection() throws SQLException {
> Configuration config =
> HBaseFactoryProvider.getConfigurationFactory().getConfiguration();
> String defaultQuorum = config.get(HConstants.ZOOKEEPER_QUORUM);
> for (String protocol : new String[] \{ "phoenix", "phoenix+zk" }) {
> String[] urls = new String[] {
> "v1,v2,v3:2181:/hbase",
> "jdbc:" + protocol + ":localhost",
> "jdbc:" + protocol + ":localhost:2181,localhost:12181:/hbase",
> "jdbc:" + protocol + ":v1,v2,v3:2181:/hbase",
> };
> for (String url : urls) {
> try {
> ZKConnectionInfo
> info =
> (ZKConnectionInfo) ConnectionInfo.create(url, null, null);
> System.out.println("1.Successfully connected to " + url + " , " +
> info.getZkHosts());
> {color:#FF0000}*// Passing the normalized url (info.getZkHosts()) from above
> again into Connection.create fails*{color}
> {color:#FF0000}*// for some formats.*{color}
> ZKConnectionInfo
> info2 =
> (ZKConnectionInfo) ConnectionInfo.create(info.getZkHosts(), null, null);
> System.out.println("2.Successfully connected to " + url + " , " +
> info.getZkHosts());
> } catch (SQLException sqle) {
> System.out.println(sqle.getMessage());
> }
> }
> }
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)