@Override public RowSet fetchResults(OperationHandle opHandle) throws HiveSQLException { return fetchResults(opHandle, FetchOrientation.FETCH_NEXT, defaultFetchRows, FetchType.QUERY_OUTPUT); }
@Override public RowSet fetchResults(OperationHandle opHandle) throws HiveSQLException { // TODO: provide STATIC default value return fetchResults(opHandle, FetchOrientation.FETCH_NEXT, DEFAULT_MAX_ROWS, FetchType.QUERY_OUTPUT); }
@Override public RowSet fetchResults(OperationHandle opHandle) throws HiveSQLException { return fetchResults(opHandle, FetchOrientation.FETCH_NEXT, defaultFetchRows, FetchType.QUERY_OUTPUT); }
@Override public RowSet fetchResults(OperationHandle opHandle) throws HiveSQLException { // TODO: provide STATIC default value return fetchResults(opHandle, FetchOrientation.FETCH_NEXT, DEFAULT_MAX_ROWS, FetchType.QUERY_OUTPUT); }
@Override public RowSet fetchResults(OperationHandle opHandle) throws HiveSQLException { // TODO: provide STATIC default value return fetchResults(opHandle, FetchOrientation.FETCH_NEXT, DEFAULT_MAX_ROWS, FetchType.QUERY_OUTPUT); }
@Override public RowSet fetchResults(OperationHandle opHandle) throws HiveSQLException { // TODO: provide STATIC default value return fetchResults(opHandle, FetchOrientation.FETCH_NEXT, DEFAULT_MAX_ROWS, FetchType.QUERY_OUTPUT); }
private void fetchLogs(OperationHandle opHandle) throws LensException { try { for (Object[] o : getClient().fetchResults(opHandle, FetchOrientation.FETCH_NEXT, -1, FetchType.LOG)) { for (Object logLine : o) { log.info("Update from hive: " + String.valueOf(logLine)); } } } catch (HiveSQLException e) { log.error("Error fetching hive operation logs for {}", opHandle, e); } }
private void fetchLogs(OperationHandle opHandle) throws LensException { try { for (Object[] o : getClient().fetchResults(opHandle, FetchOrientation.FETCH_NEXT, -1, FetchType.LOG)) { for (Object logLine : o) { log.info("Update from hive: " + String.valueOf(logLine)); } } } catch (HiveSQLException e) { log.error("Error fetching hive operation logs for {}", opHandle, e); } }
@Override public boolean hasNext() throws LensException { if (fetchedRowsItr == null || !fetchedRowsItr.hasNext()) { try { rowSet = client.fetchResults(opHandle, orientation, fetchSize, FetchType.QUERY_OUTPUT); orientation = FetchOrientation.FETCH_NEXT; noMoreResults = rowSet.numRows() == 0; if (noMoreResults) { if (closeAfterFecth) { log.info("No more results closing the query"); client.closeOperation(opHandle); } return false; } fetchedRowsItr = rowSet.iterator(); } catch (Exception e) { throw new LensException(e); } } return fetchedRowsItr.hasNext(); }
@Override public boolean hasNext() throws LensException { if (fetchedRowsItr == null || !fetchedRowsItr.hasNext()) { try { rowSet = client.fetchResults(opHandle, orientation, fetchSize, FetchType.QUERY_OUTPUT); orientation = FetchOrientation.FETCH_NEXT; noMoreResults = rowSet.numRows() == 0; if (noMoreResults) { if (closeAfterFecth) { log.info("No more results closing the query"); client.closeOperation(opHandle); } return false; } fetchedRowsItr = rowSet.iterator(); } catch (Exception e) { throw new LensException(e); } } return fetchedRowsItr.hasNext(); }