protected void authorizeMetaGets(HiveOperationType opType, List<HivePrivilegeObject> inpObjs) throws HiveSQLException { authorizeMetaGets(opType, inpObjs, null); }
@Override public void close() throws HiveSQLException { setState(OperationState.CLOSED); cleanupOperationLog(0); }
/** * Convert wildchars and escape sequence from JDBC format to datanucleous/regex */ protected String convertIdentifierPattern(final String pattern, boolean datanucleusFormat) { if (pattern == null) { return convertPattern("%", true); } else { return convertPattern(pattern, datanucleusFormat); } }
@Override public OperationHandle getTables(String catalogName, String schemaName, String tableName, List<String> tableTypes) throws HiveSQLException { acquire(true, true); OperationManager operationManager = getOperationManager(); MetadataOperation operation = operationManager.newGetTablesOperation(getSession(), catalogName, schemaName, tableName, tableTypes); 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); } }
protected MetadataOperation(HiveSession parentSession, OperationType opType) { super(parentSession, opType); setHasResultSet(true); }
@Override public OperationHandle getTables(String catalogName, String schemaName, String tableName, List<String> tableTypes) throws HiveSQLException { acquire(true); OperationManager operationManager = getOperationManager(); MetadataOperation operation = operationManager.newGetTablesOperation(getSession(), catalogName, schemaName, tableName, tableTypes); OperationHandle opHandle = operation.getHandle(); try { operation.run(); opHandleSet.add(opHandle); return opHandle; } catch (HiveSQLException e) { operationManager.closeOperation(opHandle); throw e; } finally { release(true); } }
protected MetadataOperation(HiveSession parentSession, OperationType opType) { super(parentSession, opType); setHasResultSet(true); }
@Override public void close() throws HiveSQLException { setState(OperationState.CLOSED); cleanupOperationLog(0); }
@Override public OperationHandle getTables(String catalogName, String schemaName, String tableName, List<String> tableTypes) throws HiveSQLException { acquire(true); OperationManager operationManager = getOperationManager(); MetadataOperation operation = operationManager.newGetTablesOperation(getSession(), catalogName, schemaName, tableName, tableTypes); OperationHandle opHandle = operation.getHandle(); try { operation.run(); opHandleSet.add(opHandle); return opHandle; } catch (HiveSQLException e) { operationManager.closeOperation(opHandle); throw e; } finally { release(true); } }
/** * Convert wildchars and escape sequence of schema pattern from JDBC format to datanucleous/regex * The schema pattern treats empty string also as wildchar */ protected String convertSchemaPattern(final String pattern) { if ((pattern == null) || pattern.isEmpty()) { return convertPattern("%", true); } else { return convertPattern(pattern, true); } }
protected void authorizeMetaGets(HiveOperationType opType, List<HivePrivilegeObject> inpObjs) throws HiveSQLException { authorizeMetaGets(opType, inpObjs, null); }
protected MetadataOperation(HiveSession parentSession, OperationType opType) { super(parentSession, opType, false); setHasResultSet(true); }
@Override public void close() throws HiveSQLException { setState(OperationState.CLOSED); cleanupOperationLog(); }
@Override public OperationHandle getTables(String catalogName, String schemaName, String tableName, List<String> tableTypes) throws HiveSQLException { acquire(true); OperationManager operationManager = getOperationManager(); MetadataOperation operation = operationManager.newGetTablesOperation(getSession(), catalogName, schemaName, tableName, tableTypes); OperationHandle opHandle = operation.getHandle(); try { operation.run(); opHandleSet.add(opHandle); return opHandle; } catch (HiveSQLException e) { operationManager.closeOperation(opHandle); throw e; } finally { release(true); } }
/** * Convert wildchars and escape sequence from JDBC format to datanucleous/regex */ protected String convertIdentifierPattern(final String pattern, boolean datanucleusFormat) { if (pattern == null) { return convertPattern("%", true); } else { return convertPattern(pattern, datanucleusFormat); } }
protected void authorizeMetaGets(HiveOperationType opType, List<HivePrivilegeObject> inpObjs) throws HiveSQLException { authorizeMetaGets(opType, inpObjs, null); }
protected MetadataOperation(HiveSession parentSession, OperationType opType) { super(parentSession, opType, false); setHasResultSet(true); }
@Override public void close() throws HiveSQLException { setState(OperationState.CLOSED); cleanupOperationLog(); }
@Override public OperationHandle getTables(String catalogName, String schemaName, String tableName, List<String> tableTypes) throws HiveSQLException { acquire(true); OperationManager operationManager = getOperationManager(); MetadataOperation operation = operationManager.newGetTablesOperation(getSession(), catalogName, schemaName, tableName, tableTypes); OperationHandle opHandle = operation.getHandle(); try { operation.run(); opHandleSet.add(opHandle); return opHandle; } catch (HiveSQLException e) { operationManager.closeOperation(opHandle); throw e; } finally { release(true); } }
/** * Convert wildchars and escape sequence from JDBC format to datanucleous/regex */ protected String convertIdentifierPattern(final String pattern, boolean datanucleusFormat) { if (pattern == null) { return convertPattern("%", true); } else { return convertPattern(pattern, datanucleusFormat); } }