private static ConnectionInfo defaultConnectionInfo(String url) throws SQLException { Configuration config = HBaseFactoryProvider.getConfigurationFactory().getConfiguration(); String quorum = config.get(HConstants.ZOOKEEPER_QUORUM); if (quorum == null || quorum.isEmpty()) { throw getMalFormedUrlException(url); } String clientPort = config.get(HConstants.ZOOKEEPER_CLIENT_PORT); Integer port = clientPort==null ? null : Integer.parseInt(clientPort); if (port == null || port < 0) { throw getMalFormedUrlException(url); } String znodeParent = config.get(HConstants.ZOOKEEPER_ZNODE_PARENT); LOG.debug("Getting default jdbc connection url " + quorum + ":" + port + ":" + znodeParent); return new ConnectionInfo(quorum, port, znodeParent); } }
return new ConnectionInfo(quorum,port,rootNode, principal, keytabFile);
return new ConnectionInfo(zookeeperQuorum, port, rootNode, principal, keytab);
return new ConnectionInfo(zookeeperQuorum, port, rootNode, principal, keytab);
return new ConnectionInfo(quorum,port,rootNode, principal, keytabFile);
return new ConnectionInfo(quorum,port,rootNode, principal, keytabFile);
return new ConnectionInfo(zookeeperQuorum, port, rootNode, principal, keytab);
private static ConnectionInfo defaultConnectionInfo(String url) throws SQLException { Configuration config = HBaseFactoryProvider.getConfigurationFactory().getConfiguration(); String quorum = config.get(HConstants.ZOOKEEPER_QUORUM); if (quorum == null || quorum.isEmpty()) { throw getMalFormedUrlException(url); } String clientPort = config.get(HConstants.ZOOKEEPER_CLIENT_PORT); Integer port = clientPort==null ? null : Integer.parseInt(clientPort); if (port == null || port < 0) { throw getMalFormedUrlException(url); } String znodeParent = config.get(HConstants.ZOOKEEPER_ZNODE_PARENT); LOG.debug("Getting default jdbc connection url " + quorum + ":" + port + ":" + znodeParent); return new ConnectionInfo(quorum, port, znodeParent); } }
private static ConnectionInfo defaultConnectionInfo(String url) throws SQLException { Configuration config = HBaseFactoryProvider.getConfigurationFactory().getConfiguration(); String quorum = config.get(HConstants.ZOOKEEPER_QUORUM); if (quorum == null || quorum.isEmpty()) { throw getMalFormedUrlException(url); } String clientPort = config.get(HConstants.ZOOKEEPER_CLIENT_PORT); Integer port = clientPort==null ? null : Integer.parseInt(clientPort); if (port == null || port < 0) { throw getMalFormedUrlException(url); } String znodeParent = config.get(HConstants.ZOOKEEPER_ZNODE_PARENT); LOG.debug("Getting default jdbc connection url " + quorum + ":" + port + ":" + znodeParent); return new ConnectionInfo(quorum, port, znodeParent); } }
private static String getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal) { return new PhoenixEmbeddedDriver.ConnectionInfo(zkQuorum, port, znodeParent, principal, null).toUrl() + PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR; }
private static String getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal) { return new PhoenixEmbeddedDriver.ConnectionInfo(zkQuorum, port, znodeParent, principal, null).toUrl() + PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR; }
}; ConnectionInfo[] infos = new ConnectionInfo[] { new ConnectionInfo("localhost",2181,"/hbase"), new ConnectionInfo("localhost",2181,"/hbase"), new ConnectionInfo("localhost",2181,"/hbase"), new ConnectionInfo(null,null,null), new ConnectionInfo("localhost",null,null), new ConnectionInfo("localhost",null,null), new ConnectionInfo("localhost",null,null), new ConnectionInfo("localhost",123,null), new ConnectionInfo("localhost",123,null), new ConnectionInfo("localhost",123,null), new ConnectionInfo("localhost",123,"/hbase"), new ConnectionInfo("localhost",123,"/foo-bar"), new ConnectionInfo("localhost",123,"/foo-bar"), new ConnectionInfo("localhost",123,"/foo-bar"), new ConnectionInfo("localhost",null,"/hbase"), new ConnectionInfo("localhost",null,"/foo-bar"), new ConnectionInfo("localhost",null,"/foo-bar"), new ConnectionInfo("localhost",null,"/foo-bar"), new ConnectionInfo("v1,v2,v3",null,null), new ConnectionInfo("v1,v2,v3",null,null), new ConnectionInfo("v1,v2,v3",null,null), new ConnectionInfo("v1,v2,v3",null,null), new ConnectionInfo("v1,v2,v3",null,"/hbase"), new ConnectionInfo("v1,v2,v3",null,"/hbase"), new ConnectionInfo("v1,v2,v3",null,"/foo-bar"), new ConnectionInfo("v1,v2,v3",123,"/hbase"), new ConnectionInfo("v1,v2,v3",123,"/hbase"),
private static String getUrlInternal(String zkQuorum, Integer port, String znodeParent, String principal) { return new PhoenixEmbeddedDriver.ConnectionInfo(zkQuorum, port, znodeParent, principal, null).toUrl() + PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR; }