Search in sources :

Example 1 with GetCatalogsOperation

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

the class HiveSessionImpl method getCatalogs.

@Override
public OperationHandle getCatalogs() throws HiveSQLException {
    acquire(true, true);
    OperationManager operationManager = getOperationManager();
    GetCatalogsOperation operation = operationManager.newGetCatalogsOperation(getSession());
    OperationHandle opHandle = operation.getHandle();
    try {
        operation.run();
        addOpHandle(opHandle);
        return opHandle;
    } catch (HiveSQLException e) {
        operationManager.closeOperation(opHandle);
        throw e;
    } finally {
        release(true, true);
    }
}
Also used : GetCatalogsOperation(org.apache.hive.service.cli.operation.GetCatalogsOperation) 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 GetCatalogsOperation (org.apache.hive.service.cli.operation.GetCatalogsOperation)1 OperationManager (org.apache.hive.service.cli.operation.OperationManager)1