org.apache.calcite.avatica.UnregisteredDriver Java Examples
The following examples show how to use
org.apache.calcite.avatica.UnregisteredDriver.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KylinConnection.java From kylin with Apache License 2.0 | 6 votes |
protected KylinConnection(UnregisteredDriver driver, JdbcFactory factory, String url, Properties info) throws SQLException { super(driver, factory, url, info); String odbcUrl = url; odbcUrl = odbcUrl.replaceAll((Driver.CONNECT_STRING_PREFIX + "[[A-Za-z0-9]*=[A-Za-z0-9]*;]*//").toString(), ""); String[] temps = Iterables.toArray(Splitter.on("/").split(odbcUrl), String.class); assert temps.length >= 2; this.project = temps[temps.length - 1]; this.baseUrl = odbcUrl.substring(0, odbcUrl.lastIndexOf(project) - 1); logger.debug("Kylin base url " + this.baseUrl + ", project name " + this.project); this.remoteClient = factory.newRemoteClient(this); try { this.remoteClient.connect(); } catch (IOException e) { throw new SQLException(e); } }
Example #2
Source File: KylinConnection.java From kylin-on-parquet-v2 with Apache License 2.0 | 6 votes |
protected KylinConnection(UnregisteredDriver driver, JdbcFactory factory, String url, Properties info) throws SQLException { super(driver, factory, url, info); String odbcUrl = url; odbcUrl = odbcUrl.replaceAll((Driver.CONNECT_STRING_PREFIX + "[[A-Za-z0-9]*=[A-Za-z0-9]*;]*//").toString(), ""); String[] temps = Iterables.toArray(Splitter.on("/").split(odbcUrl), String.class); assert temps.length >= 2; this.project = temps[temps.length - 1]; this.baseUrl = odbcUrl.substring(0, odbcUrl.lastIndexOf(project) - 1); logger.debug("Kylin base url " + this.baseUrl + ", project name " + this.project); this.remoteClient = factory.newRemoteClient(this); try { this.remoteClient.connect(); } catch (IOException e) { throw new SQLException(e); } }
Example #3
Source File: CalciteFactory.java From calcite with Apache License 2.0 | 5 votes |
public final AvaticaConnection newConnection( UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info) { return newConnection(driver, factory, url, info, null, null); }
Example #4
Source File: QuarkJdbcFactory.java From quark with Apache License 2.0 | 5 votes |
/** * Creates a Quark connection for Avatica (in terms of Avatica types). * <p> * This implementation delegates to * {@link #newConnection(QuarkDriver, QuarkJdbcFactory, String, Properties, CalciteRootSchema, * JavaTypeFactory)}. * </p> */ @Override public final AvaticaConnection newConnection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info) throws SQLException { return newConnection((QuarkDriver) driver, (QuarkJdbcFactory) factory, url, info, null, null); }
Example #5
Source File: CalciteFactory.java From Quicksql with MIT License | 5 votes |
public final AvaticaConnection newConnection( UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info) { return newConnection(driver, factory, url, info, null, null); }
Example #6
Source File: DremioFactory.java From dremio-oss with Apache License 2.0 | 5 votes |
/** * Creates a Dremio connection for Avatica (in terms of Avatica types). * <p> * This implementation delegates to * {@link #newDremioConnection(DriverImpl, DremioFactory, String, Properties)}. * </p> */ @Override public final AvaticaConnection newConnection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info) throws SQLException { return newConnection((DriverImpl) driver, (DremioFactory) factory, url, info); }
Example #7
Source File: DremioConnectionImpl.java From dremio-oss with Apache License 2.0 | 4 votes |
UnregisteredDriver getDriver() { return driver; }
Example #8
Source File: CalciteConnectionImpl.java From calcite with Apache License 2.0 | 4 votes |
UnregisteredDriver getDriver() { return driver; }
Example #9
Source File: CalciteJdbc41Factory.java From calcite with Apache License 2.0 | 4 votes |
public CalciteJdbc41Connection newConnection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info, CalciteSchema rootSchema, JavaTypeFactory typeFactory) { return new CalciteJdbc41Connection( (Driver) driver, factory, url, info, rootSchema, typeFactory); }
Example #10
Source File: CalciteFactory.java From calcite with Apache License 2.0 | 4 votes |
/** Creates a connection with a root schema. */ public abstract AvaticaConnection newConnection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info, CalciteSchema rootSchema, JavaTypeFactory typeFactory);
Example #11
Source File: KylinJdbcFactory.java From kylin with Apache License 2.0 | 4 votes |
@Override public AvaticaConnection newConnection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info) throws SQLException { return new KylinConnection(driver, (KylinJdbcFactory) factory, url, info); }
Example #12
Source File: QuarkConnectionImpl.java From quark with Apache License 2.0 | 4 votes |
UnregisteredDriver getDriver() { return driver; }
Example #13
Source File: KylinJdbcFactory.java From kylin-on-parquet-v2 with Apache License 2.0 | 4 votes |
@Override public AvaticaConnection newConnection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info) throws SQLException { return new KylinConnection(driver, (KylinJdbcFactory) factory, url, info); }
Example #14
Source File: QuicksqlFactory.java From Quicksql with MIT License | 4 votes |
/** Creates a connection with a root schema. */ public abstract AvaticaConnection newConnection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info);
Example #15
Source File: QuicksqlJdbc41Factory.java From Quicksql with MIT License | 4 votes |
QuickSqlJdbc41Connection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info) { super(driver, factory, url, info); }
Example #16
Source File: QuicksqlJdbc41Factory.java From Quicksql with MIT License | 4 votes |
public QuickSqlJdbc41Connection newConnection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info) { return new QuickSqlJdbc41Connection(driver, factory, url, info); }
Example #17
Source File: CalciteConnectionImpl.java From Quicksql with MIT License | 4 votes |
UnregisteredDriver getDriver() { return driver; }
Example #18
Source File: CalciteJdbc41Factory.java From Quicksql with MIT License | 4 votes |
public CalciteJdbc41Connection newConnection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info, CalciteSchema rootSchema, JavaTypeFactory typeFactory) { return new CalciteJdbc41Connection( (Driver) driver, factory, url, info, rootSchema, typeFactory); }
Example #19
Source File: CalciteFactory.java From Quicksql with MIT License | 4 votes |
/** Creates a connection with a root schema. */ public abstract AvaticaConnection newConnection(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info, CalciteSchema rootSchema, JavaTypeFactory typeFactory);
Example #20
Source File: QuicksqlConnectionImpl.java From Quicksql with MIT License | 2 votes |
/** * Creates a QuicksqlConnectionImpl. * * <p>Not public; method is called only from the driver.</p> * * @param driver Driver * @param factory Factory for JDBC objects * @param url Server URL * @param info Other connection properties */ protected QuicksqlConnectionImpl(UnregisteredDriver driver, AvaticaFactory factory, String url, Properties info) { super(driver, factory, url, info); }