@Override public void close() throws SQLException { delegate.close(); }
@Override public void close() throws SQLException { delegate.close(); }
@Override public void close() throws SQLException { delegate.close(); }
@Override public void close() throws SQLException { iterator.close(); }
@Override public void close() throws IOException { if(resultIterator != null) { try { resultIterator.close(); } catch (SQLException e) { LOG.error(" Error closing resultset."); throw new RuntimeException(e); } } }
@Override public void close() throws IOException { if (LOG.isInfoEnabled()) { LOG.info("Read Count : " + readCount); } if (resultIterator != null) { try { resultIterator.close(); } catch (SQLException e) { LOG.error(" Error closing resultset."); throw new RuntimeException(e); } } }
@Override public void close() throws SQLException { keyIterator = null; keyList = null; hash = null; try { memoryChunk.close(); } finally { resultIterator.close(); } }
@Override public void close() throws SQLException { closed = true; // ok to say closed even if the below code throws an exception try { scanIterator.close(); fs.delete(this.restoreDir, true); } catch (IOException e) { throw ServerUtil.parseServerException(e); } finally { scanIterator = UNINITIALIZED_SCANNER; } }
private void getEstimates() throws SQLException { getEstimatesCalled = true; // Initialize a dummy iterator to get the estimates based on stats. ResultIterator iterator = iterator(); iterator.close(); } }
private static SQLException closeIterators(ResultIterator lhsIterator, ResultIterator rhsIterator) { SQLException e = null; try { lhsIterator.close(); } catch (Throwable e1) { e = e1 instanceof SQLException ? (SQLException)e1 : new SQLException(e1); } try { rhsIterator.close(); } catch (Throwable e2) { SQLException e22 = e2 instanceof SQLException ? (SQLException)e2 : new SQLException(e2); if (e != null) { e.setNextException(e22); } else { e = e22; } } return e; }
@Override public void close() throws SQLException { try { renewLeaseLock.lock(); closed = true; // ok to say closed even if the below code throws an exception try { scanIterator.close(); } finally { try { scanIterator = UNINITIALIZED_SCANNER; htable.close(); } catch (IOException e) { throw ServerUtil.parseServerException(e); } } } finally { renewLeaseLock.unlock(); } }
@Override public Tuple next() throws SQLException { while (true) { if (!initSnapshotScanner()) return null; try { lastTuple = scanIterator.next(); if (lastTuple != null) { ImmutableBytesWritable ptr = new ImmutableBytesWritable(); lastTuple.getKey(ptr); return lastTuple; } } finally { if (lastTuple == null) { scanIterator.close(); scanIterator = UNINITIALIZED_SCANNER; } } } }
rhsCurrent = rhsIter.next(); if (rhsCurrent == null) { rhsIter.close(); rhsIter = null; } else if (isSingleValueOnly) { if ((rhsCurrent == null && (joinType == JoinType.Inner || joinType == JoinType.Semi)) || (rhsCurrent != null && joinType == JoinType.Anti)) { rhsIter.close(); rhsIter = null; rhsIter.close(); rhsIter = null;
@Override public ExplainPlan getExplainPlan() throws SQLException { if (context.getScanRanges() == ScanRanges.NOTHING) { return new ExplainPlan(Collections.singletonList("DEGENERATE SCAN OVER " + getTableRef().getTable().getName().getString())); } ResultIterator iterator = iterator(); ExplainPlan explainPlan = new ExplainPlan(getPlanSteps(iterator)); iterator.close(); return explainPlan; }
@Override public void close() throws SQLException { if (isClosed) { return; } try { scanner.close(); } finally { isClosed = true; statement.getResultSets().remove(this); overAllQueryMetrics.endQuery(); overAllQueryMetrics.stopResultSetWatch(); if (!queryLogger.isSynced()) { if(this.exception==null){ queryLogger.log(QueryLogInfo.QUERY_STATUS_I,QueryStatus.COMPLETED.toString()); } queryLogger.log(QueryLogInfo.NO_OF_RESULTS_ITERATED_I, count); if (queryLogger.isDebugEnabled()) { queryLogger.log(QueryLogInfo.SCAN_METRICS_JSON_I, readMetricsQueue.getScanMetricsHolderList().toString()); readMetricsQueue.getScanMetricsHolderList().clear(); } // if not already synced , like closing before result set exhausted queryLogger.sync(getReadMetrics(), getOverAllRequestReadMetrics()); } } }
public static void assertResults(ResultIterator scanner, AssertingIterator iterator) throws Exception { try { for (Tuple result = scanner.next(); result != null; result = scanner.next()) { iterator.assertNext(result); } iterator.assertDone(); } finally { scanner.close(); } }
return mutationState; } finally { iterator.close();
iterator.close();
iterator.close();