Java Code Examples for org.apache.calcite.avatica.AvaticaConnection#setService()

The following examples show how to use org.apache.calcite.avatica.AvaticaConnection#setService() . 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: Driver.java    From Quicksql with MIT License 5 votes vote down vote up
@Override public Meta createMeta(AvaticaConnection connection) {
  final ConnectionConfig config = connection.config();

  // Perform the login and launch the renewal thread if necessary
  final KerberosConnection kerberosUtil = createKerberosUtility(config);
  if (null != kerberosUtil) {
    kerberosUtil.login();
    connection.setKerberosConnection(kerberosUtil);
  }

  // Create a single Service and set it on the Connection instance
  final Service service = createService(connection, config);
  connection.setService(service);
  return new QuicksqlRemoteMeta(connection, service);
}
 
Example 2
Source File: Driver.java    From calcite-avatica with Apache License 2.0 5 votes vote down vote up
@Override public Meta createMeta(AvaticaConnection connection) {
  final ConnectionConfig config = connection.config();

  // Perform the login and launch the renewal thread if necessary
  final KerberosConnection kerberosUtil = createKerberosUtility(config);
  if (null != kerberosUtil) {
    kerberosUtil.login();
    connection.setKerberosConnection(kerberosUtil);
  }

  // Create a single Service and set it on the Connection instance
  final Service service = createService(connection, config);
  connection.setService(service);
  return new RemoteMeta(connection, service);
}
 
Example 3
Source File: AlternatingRemoteMetaTest.java    From calcite-avatica with Apache License 2.0 4 votes vote down vote up
@Override public Meta createMeta(AvaticaConnection connection) {
  final ConnectionConfig config = connection.config();
  final Service service = new RemoteService(getHttpClient(connection, config));
  connection.setService(service);
  return new RemoteMeta(connection, service);
}