@Test public void testFirstConnectionWhenPropsHasTenantId() throws Exception { Properties props = new Properties(); final String tenantId = "00Dxx0000001234"; props.put(PhoenixRuntime.TENANT_ID_ATTRIB, tenantId); Connection connection = new PhoenixTestDriver().connect(getUrl(), props); assertEquals(tenantId, connection.getClientInfo(PhoenixRuntime.TENANT_ID_ATTRIB)); }
@Override public Connection connect(String url, Properties info) throws SQLException { if (!acceptsURL(url)) { return null; } try { lockInterruptibly(LockMode.READ); checkClosed(); return createConnection(url, info); } finally { unlock(LockMode.READ); } }
PhoenixDriver extends PhoenixEmbeddedDriver { @Override public Connection connect(String url, Properties info) throws SQLException { if (!acceptsURL(url)) { return null; } try { lockInterruptibly(LockMode.READ); checkClosed(); return createConnection(url, info); } finally { unlock(LockMode.READ); } } }
PhoenixDriver extends PhoenixEmbeddedDriver { @Override public Connection connect(String url, Properties info) throws SQLException { if (!acceptsURL(url)) { return null; } try { lockInterruptibly(LockMode.READ); checkClosed(); return createConnection(url, info); } finally { unlock(LockMode.READ); } } PhoenixDriver(); }
PhoenixDriver extends PhoenixEmbeddedDriver { @Override public Connection connect(String url, Properties info) throws SQLException { if (!acceptsURL(url)) { return null; } try { lockInterruptibly(LockMode.READ); checkClosed(); return createConnection(url, info); } finally { unlock(LockMode.READ); } } PhoenixDriver(); @Override QueryServices getQueryServices(); @Override boolean acceptsURL(String url); @Override Connection connect(String url, Properties info); @Override synchronized void close(); }
PhoenixDriver extends PhoenixEmbeddedDriver { @Override public Connection connect(String url, Properties info) throws SQLException { if (!acceptsURL(url)) { return null; } try { lockInterruptibly(LockMode.READ); checkClosed(); return createConnection(url, info); } finally { unlock(LockMode.READ); } } PhoenixDriver(); @Override QueryServices getQueryServices(); @Override boolean acceptsURL(String url); @Override Connection connect(String url, Properties info); @Override synchronized void close(); static final PhoenixDriver INSTANCE; }