public GetCatalogsOperation newGetCatalogsOperation(HiveSession parentSession) { GetCatalogsOperation operation = new GetCatalogsOperation(parentSession); addOperation(operation); return operation; }
@Override public RowSet getNextRowSet(FetchOrientation orientation, long maxRows) throws HiveSQLException { assertState(new ArrayList<OperationState>(Arrays.asList(OperationState.FINISHED))); validateDefaultFetchOrientation(orientation); if (orientation.equals(FetchOrientation.FETCH_FIRST)) { rowSet.setStartOffset(0); } return rowSet.extractSubset((int)maxRows); } }
@Override public void runInternal() throws HiveSQLException { setState(OperationState.RUNNING); try { if (isAuthV2Enabled()) { authorizeMetaGets(HiveOperationType.GET_CATALOGS, null); } setState(OperationState.FINISHED); LOG.info("Fetching catalog metadata has been successfully finished"); } catch (HiveSQLException e) { setState(OperationState.ERROR); throw e; } }
@Override public OperationHandle getCatalogs() throws HiveSQLException { acquire(true, true); OperationManager operationManager = getOperationManager(); GetCatalogsOperation operation = operationManager.newGetCatalogsOperation(getSession()); 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 GetCatalogsOperation(HiveSession parentSession) { super(parentSession, OperationType.GET_CATALOGS); rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion(), false); LOG.info("Starting GetCatalogsOperation"); }
@Override public OperationHandle getCatalogs() throws HiveSQLException { acquire(true); OperationManager operationManager = getOperationManager(); GetCatalogsOperation operation = operationManager.newGetCatalogsOperation(getSession()); OperationHandle opHandle = operation.getHandle(); try { operation.run(); opHandleSet.add(opHandle); return opHandle; } catch (HiveSQLException e) { operationManager.closeOperation(opHandle); throw e; } finally { release(true); } }
protected GetCatalogsOperation(HiveSession parentSession) { super(parentSession, OperationType.GET_CATALOGS); rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion(), false); }
@Override public void runInternal() throws HiveSQLException { setState(OperationState.RUNNING); try { if (isAuthV2Enabled()) { authorizeMetaGets(HiveOperationType.GET_CATALOGS, null); } setState(OperationState.FINISHED); } catch (HiveSQLException e) { setState(OperationState.ERROR); throw e; } }
@Override public RowSet getNextRowSet(FetchOrientation orientation, long maxRows) throws HiveSQLException { assertState(new ArrayList<OperationState>(Arrays.asList(OperationState.FINISHED))); validateDefaultFetchOrientation(orientation); if (orientation.equals(FetchOrientation.FETCH_FIRST)) { rowSet.setStartOffset(0); } return rowSet.extractSubset((int)maxRows); } }
@Override public OperationHandle getCatalogs() throws HiveSQLException { acquire(true); OperationManager operationManager = getOperationManager(); GetCatalogsOperation operation = operationManager.newGetCatalogsOperation(getSession()); OperationHandle opHandle = operation.getHandle(); try { operation.run(); opHandleSet.add(opHandle); return opHandle; } catch (HiveSQLException e) { operationManager.closeOperation(opHandle); throw e; } finally { release(true); } }
public GetCatalogsOperation newGetCatalogsOperation(HiveSession parentSession) { GetCatalogsOperation operation = new GetCatalogsOperation(parentSession); addOperation(operation); return operation; }
protected GetCatalogsOperation(HiveSession parentSession) { super(parentSession, OperationType.GET_CATALOGS); rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion()); }
@Override public void runInternal() throws HiveSQLException { setState(OperationState.RUNNING); try { if (isAuthV2Enabled()) { authorizeMetaGets(HiveOperationType.GET_CATALOGS, null); } setState(OperationState.FINISHED); } catch (HiveSQLException e) { setState(OperationState.ERROR); throw e; } }
@Override public RowSet getNextRowSet(FetchOrientation orientation, long maxRows) throws HiveSQLException { assertState(OperationState.FINISHED); validateDefaultFetchOrientation(orientation); if (orientation.equals(FetchOrientation.FETCH_FIRST)) { rowSet.setStartOffset(0); } return rowSet.extractSubset((int)maxRows); } }
@Override public OperationHandle getCatalogs() throws HiveSQLException { acquire(true); OperationManager operationManager = getOperationManager(); GetCatalogsOperation operation = operationManager.newGetCatalogsOperation(getSession()); OperationHandle opHandle = operation.getHandle(); try { operation.run(); opHandleSet.add(opHandle); return opHandle; } catch (HiveSQLException e) { operationManager.closeOperation(opHandle); throw e; } finally { release(true); } }
public GetCatalogsOperation newGetCatalogsOperation(HiveSession parentSession) { GetCatalogsOperation operation = new GetCatalogsOperation(parentSession); addOperation(operation); return operation; }
protected GetCatalogsOperation(HiveSession parentSession) { super(parentSession, OperationType.GET_CATALOGS); rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion()); }
@Override public void runInternal() throws HiveSQLException { setState(OperationState.RUNNING); try { if (isAuthV2Enabled()) { authorizeMetaGets(HiveOperationType.GET_CATALOGS, null); } setState(OperationState.FINISHED); } catch (HiveSQLException e) { setState(OperationState.ERROR); throw e; } }
@Override public RowSet getNextRowSet(FetchOrientation orientation, long maxRows) throws HiveSQLException { assertState(OperationState.FINISHED); validateDefaultFetchOrientation(orientation); if (orientation.equals(FetchOrientation.FETCH_FIRST)) { rowSet.setStartOffset(0); } return rowSet.extractSubset((int)maxRows); } }
@Override public OperationHandle getCatalogs() throws HiveSQLException { acquire(true); OperationManager operationManager = getOperationManager(); GetCatalogsOperation operation = operationManager.newGetCatalogsOperation(getSession()); OperationHandle opHandle = operation.getHandle(); try { operation.run(); opHandleSet.add(opHandle); return opHandle; } catch (HiveSQLException e) { operationManager.closeOperation(opHandle); throw e; } finally { release(true); } }