Search in sources :

Example 1 with GetTableTypesOperation

use of org.apache.hive.service.cli.operation.GetTableTypesOperation in project hive by apache.

the class HiveSessionImpl method getTableTypes.

@Override
public OperationHandle getTableTypes() throws HiveSQLException {
    acquire(true, true);
    OperationManager operationManager = getOperationManager();
    GetTableTypesOperation operation = operationManager.newGetTableTypesOperation(getSession());
    OperationHandle opHandle = operation.getHandle();
    try {
        addOpHandle(opHandle);
        operation.run();
        return opHandle;
    } catch (HiveSQLException e) {
        removeOpHandle(opHandle);
        operationManager.closeOperation(opHandle);
        throw e;
    } finally {
        release(true, true);
    }
}
Also used : GetTableTypesOperation(org.apache.hive.service.cli.operation.GetTableTypesOperation) HiveSQLException(org.apache.hive.service.cli.HiveSQLException) OperationManager(org.apache.hive.service.cli.operation.OperationManager) OperationHandle(org.apache.hive.service.cli.OperationHandle)

Aggregations

HiveSQLException (org.apache.hive.service.cli.HiveSQLException)1 OperationHandle (org.apache.hive.service.cli.OperationHandle)1 GetTableTypesOperation (org.apache.hive.service.cli.operation.GetTableTypesOperation)1 OperationManager (org.apache.hive.service.cli.operation.OperationManager)1