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);
}
}
Aggregations