@Test public void testFirstConnectionWhenUrlHasTenantId() throws Exception { final String tenantId = "00Dxx0000001234"; String url = getUrl() + ";" + PhoenixRuntime.TENANT_ID_ATTRIB + "=" + tenantId; Driver driver = new PhoenixTestDriver(); driver.connect(url, new Properties()); }
@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; }