Search in sources :

Example 1 with GetCrossReferenceOperation

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

the class HiveSessionImpl method getCrossReference.

@Override
public OperationHandle getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws HiveSQLException {
    acquire(true, true);
    OperationManager operationManager = getOperationManager();
    GetCrossReferenceOperation operation = operationManager.newGetCrossReferenceOperation(getSession(), primaryCatalog, primarySchema, primaryTable, foreignCatalog, foreignSchema, foreignTable);
    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 : GetCrossReferenceOperation(org.apache.hive.service.cli.operation.GetCrossReferenceOperation) 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 GetCrossReferenceOperation (org.apache.hive.service.cli.operation.GetCrossReferenceOperation)1 OperationManager (org.apache.hive.service.cli.operation.OperationManager)1