Search in sources :

Example 6 with HiveSession

use of org.apache.hive.service.cli.session.HiveSession in project hive by apache.

the class CLIService method executeStatementAsync.

/**
   * Execute statement asynchronously on the server. This is a non-blocking call
   */
@Override
public OperationHandle executeStatementAsync(SessionHandle sessionHandle, String statement, Map<String, String> confOverlay) throws HiveSQLException {
    HiveSession session = sessionManager.getSession(sessionHandle);
    // need to reset the monitor, as operation handle is not available down stream, Ideally the
    // monitor should be associated with the operation handle.
    session.getSessionState().updateProgressMonitor(null);
    OperationHandle opHandle = session.executeStatementAsync(statement, confOverlay);
    LOG.debug(sessionHandle + ": executeStatementAsync()");
    return opHandle;
}
Also used : HiveSession(org.apache.hive.service.cli.session.HiveSession)

Aggregations

HiveSession (org.apache.hive.service.cli.session.HiveSession)6 HashMap (java.util.HashMap)1 HiveConf (org.apache.hadoop.hive.conf.HiveConf)1 SessionState (org.apache.hadoop.hive.ql.session.SessionState)1 Service (org.apache.hive.service.Service)1 RetryingThriftCLIServiceClient (org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient)1 ThriftCLIService (org.apache.hive.service.cli.thrift.ThriftCLIService)1 Before (org.junit.Before)1 Test (org.junit.Test)1