Search in sources :

Example 1 with GetSchemasOperation

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

the class HiveSessionImpl method getSchemas.

@Override
public OperationHandle getSchemas(String catalogName, String schemaName) throws HiveSQLException {
    acquire(true, true);
    OperationManager operationManager = getOperationManager();
    GetSchemasOperation operation = operationManager.newGetSchemasOperation(getSession(), catalogName, schemaName);
    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 : GetSchemasOperation(org.apache.hive.service.cli.operation.GetSchemasOperation) 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 GetSchemasOperation (org.apache.hive.service.cli.operation.GetSchemasOperation)1 OperationManager (org.apache.hive.service.cli.operation.OperationManager)1