use of org.apache.hive.service.cli.operation.GetPrimaryKeysOperation in project hive by apache.
the class HiveSessionImpl method getPrimaryKeys.
@Override
public OperationHandle getPrimaryKeys(String catalog, String schema, String table) throws HiveSQLException {
acquire(true, true);
OperationManager operationManager = getOperationManager();
GetPrimaryKeysOperation operation = operationManager.newGetPrimaryKeysOperation(getSession(), catalog, schema, table);
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