for (int j = 0; j < numScans; j++) { Scan scan = nestedScans.get(i).get(j); scanLocations.add(new ScanLocator(scan, i, j, j == 0, (j == numScans - 1))); final long renewLeaseThreshold = context.getConnection().getQueryServices().getRenewLeaseThresholdMilliSeconds(); for (final ScanLocator scanLocation : scanLocations) { final Scan scan = scanLocation.getScan(); final ScanMetricsHolder scanMetricsHolder = ScanMetricsHolder.getInstance(readMetrics, physicalTableName, scan, context.getConnection().getLogLevel()); nestedFutures.get(scanLocation.getOuterListIndex()).set(scanLocation.getInnerListIndex(), new Pair<Scan,Future<PeekingResultIterator>>(scan,future));
@Override public PeekingResultIterator call() throws Exception { long startTime = System.currentTimeMillis(); if (logger.isDebugEnabled()) { logger.debug(LogUtil.addCustomAnnotations("Id: " + scanId + ", Time: " + (System.currentTimeMillis() - startTime) + "ms, Scan: " + scan, ScanUtil.getCustomAnnotations(scan))); } PeekingResultIterator iterator = iteratorFactory.newIterator(context, tableResultItr, scan, physicalTableName, ParallelIterators.this.plan); if (initFirstScanOnly) { if ((!isReverse && scanLocation.isFirstScan()) || (isReverse && scanLocation.isLastScan())) { // Fill the scanner's cache. This helps reduce latency since we are parallelizing the I/O needed. iterator.peek(); } } else { iterator.peek(); } allIterators.add(iterator); return iterator; }
for (int j = 0; j < numScans; j++) { Scan scan = nestedScans.get(i).get(j); scanLocations.add(new ScanLocator(scan, i, j, j == 0, (j == numScans - 1))); final long renewLeaseThreshold = context.getConnection().getQueryServices().getRenewLeaseThresholdMilliSeconds(); for (final ScanLocator scanLocation : scanLocations) { final Scan scan = scanLocation.getScan(); final ScanMetricsHolder scanMetricsHolder = ScanMetricsHolder.getInstance(readMetrics, physicalTableName, scan, context.getConnection().getLogLevel()); nestedFutures.get(scanLocation.getOuterListIndex()).set(scanLocation.getInnerListIndex(), new Pair<Scan,Future<PeekingResultIterator>>(scan,future));
for (int j = 0; j < numScans; j++) { Scan scan = nestedScans.get(i).get(j); scanLocations.add(new ScanLocator(scan, i, j, j == 0, (j == numScans - 1))); final long renewLeaseThreshold = context.getConnection().getQueryServices().getRenewLeaseThresholdMilliSeconds(); for (final ScanLocator scanLocation : scanLocations) { final Scan scan = scanLocation.getScan(); final ScanMetricsHolder scanMetricsHolder = ScanMetricsHolder.getInstance(readMetrics, physicalTableName, scan, context.getConnection().getLogLevel()); nestedFutures.get(scanLocation.getOuterListIndex()).set(scanLocation.getInnerListIndex(), new Pair<Scan,Future<PeekingResultIterator>>(scan,future));
@Override public PeekingResultIterator call() throws Exception { long startTime = System.currentTimeMillis(); if (logger.isDebugEnabled()) { logger.debug(LogUtil.addCustomAnnotations("Id: " + scanId + ", Time: " + (System.currentTimeMillis() - startTime) + "ms, Scan: " + scan, ScanUtil.getCustomAnnotations(scan))); } PeekingResultIterator iterator = iteratorFactory.newIterator(context, tableResultItr, scan, physicalTableName, ParallelIterators.this.plan); if (initFirstScanOnly) { if ((!isReverse && scanLocation.isFirstScan()) || (isReverse && scanLocation.isLastScan())) { // Fill the scanner's cache. This helps reduce latency since we are parallelizing the I/O needed. iterator.peek(); } } else { iterator.peek(); } allIterators.add(iterator); return iterator; }
@Override public PeekingResultIterator call() throws Exception { long startTime = System.currentTimeMillis(); if (logger.isDebugEnabled()) { logger.debug(LogUtil.addCustomAnnotations("Id: " + scanId + ", Time: " + (System.currentTimeMillis() - startTime) + "ms, Scan: " + scan, ScanUtil.getCustomAnnotations(scan))); } PeekingResultIterator iterator = iteratorFactory.newIterator(context, tableResultItr, scan, physicalTableName, ParallelIterators.this.plan); if (initFirstScanOnly) { if ((!isReverse && scanLocation.isFirstScan()) || (isReverse && scanLocation.isLastScan())) { // Fill the scanner's cache. This helps reduce latency since we are parallelizing the I/O needed. iterator.peek(); } } else { iterator.peek(); } allIterators.add(iterator); return iterator; }