Search in sources :

Example 1 with GetFunctionsOperation

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

the class HiveSessionImpl method getFunctions.

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