use of org.apache.hive.service.cli.operation.GetColumnsOperation in project hive by apache.
the class HiveSessionImpl method getColumns.
@Override
public OperationHandle getColumns(String catalogName, String schemaName, String tableName, String columnName) throws HiveSQLException {
acquire(true, true);
String addedJars = Utilities.getResourceFiles(sessionConf, SessionState.ResourceType.JAR);
if (StringUtils.isNotBlank(addedJars)) {
IMetaStoreClient metastoreClient = getSession().getMetaStoreClient();
metastoreClient.setHiveAddedJars(addedJars);
}
OperationManager operationManager = getOperationManager();
GetColumnsOperation operation = operationManager.newGetColumnsOperation(getSession(), catalogName, schemaName, tableName, columnName);
OperationHandle opHandle = operation.getHandle();
try {
operation.run();
addOpHandle(opHandle);
return opHandle;
} catch (HiveSQLException e) {
operationManager.closeOperation(opHandle);
throw e;
} finally {
release(true, true);
}
}
Aggregations