Search in sources :

Example 6 with TGetOperationStatusResp

use of org.apache.hive.service.rpc.thrift.TGetOperationStatusResp in project hive by apache.

the class HiveStatement method waitForResultSetStatus.

/**
 * Poll the result set status by checking if isSetHasResultSet is set
 * @return
 * @throws SQLException
 */
private TGetOperationStatusResp waitForResultSetStatus() throws SQLException {
    TGetOperationStatusReq statusReq = new TGetOperationStatusReq(stmtHandle);
    TGetOperationStatusResp statusResp = null;
    while (statusResp == null || !statusResp.isSetHasResultSet()) {
        try {
            statusResp = client.GetOperationStatus(statusReq);
        } catch (TException e) {
            isLogBeingGenerated = false;
            throw new SQLException(e.toString(), "08S01", e);
        }
    }
    return statusResp;
}
Also used : TException(org.apache.thrift.TException) SQLException(java.sql.SQLException) TGetOperationStatusResp(org.apache.hive.service.rpc.thrift.TGetOperationStatusResp) TGetOperationStatusReq(org.apache.hive.service.rpc.thrift.TGetOperationStatusReq)

Aggregations

TGetOperationStatusResp (org.apache.hive.service.rpc.thrift.TGetOperationStatusResp)6 TException (org.apache.thrift.TException)4 TGetOperationStatusReq (org.apache.hive.service.rpc.thrift.TGetOperationStatusReq)3 SQLException (java.sql.SQLException)2 HiveSQLException (org.apache.hive.service.cli.HiveSQLException)2 OperationStatus (org.apache.hive.service.cli.OperationStatus)2 IOException (java.io.IOException)1 UnknownHostException (java.net.UnknownHostException)1 SQLFeatureNotSupportedException (java.sql.SQLFeatureNotSupportedException)1 SQLTimeoutException (java.sql.SQLTimeoutException)1 LoginException (javax.security.auth.login.LoginException)1 ServiceException (org.apache.hive.service.ServiceException)1 JobProgressUpdate (org.apache.hive.service.cli.JobProgressUpdate)1 OperationHandle (org.apache.hive.service.cli.OperationHandle)1 OperationState (org.apache.hive.service.cli.OperationState)1 ProgressMonitorStatusMapper (org.apache.hive.service.cli.ProgressMonitorStatusMapper)1 TezProgressMonitorStatusMapper (org.apache.hive.service.cli.TezProgressMonitorStatusMapper)1 TJobExecutionStatus (org.apache.hive.service.rpc.thrift.TJobExecutionStatus)1 TProgressUpdateResp (org.apache.hive.service.rpc.thrift.TProgressUpdateResp)1