private List<List<Scan>> getParallelScans() throws SQLException { // If the scan boundaries are not matching with scan in context that means we need to get // parallel scans for the chunk after split/merge. if (!ScanUtil.isContextScan(scan, context)) { return getParallelScans(scan); } return getParallelScans(EMPTY_BYTE_ARRAY, EMPTY_BYTE_ARRAY); }
private List<PeekingResultIterator> recreateIterators(ConnectionQueryServices services, boolean isLocalIndex, Queue<PeekingResultIterator> allIterators, List<PeekingResultIterator> iterators, boolean isReverse, long maxQueryEndTime, ScanWrapper previousScan, boolean clearedCache, List<PeekingResultIterator> concatIterators, Iterator<Pair<Scan, Future<PeekingResultIterator>>> scanPairItr, Pair<Scan, Future<PeekingResultIterator>> scanPair, int retryCount) throws SQLException { scanPairItr.remove(); // Resubmit just this portion of work again Scan oldScan = scanPair.getFirst(); byte[] startKey = oldScan.getAttribute(SCAN_ACTUAL_START_ROW); byte[] endKey = oldScan.getStopRow(); List<List<Scan>> newNestedScans = this.getParallelScans(startKey, endKey); // Add any concatIterators that were successful so far // as we need these to be in order addIterator(iterators, concatIterators); concatIterators = Lists.newArrayList(); getIterators(newNestedScans, services, isLocalIndex, allIterators, iterators, isReverse, maxQueryEndTime, newNestedScans.size(), previousScan, retryCount); return concatIterators; }
this.scans = getParallelScans(); List<KeyRange> splitRanges = Lists.newArrayListWithExpectedSize(scans.size() * ESTIMATED_GUIDEPOSTS_PER_REGION); for (List<Scan> scanList : scans) {
private List<List<Scan>> getParallelScans() throws SQLException { // If the scan boundaries are not matching with scan in context that means we need to get // parallel scans for the chunk after split/merge. if (!ScanUtil.isContextScan(scan, context)) { return getParallelScans(scan); } return getParallelScans(EMPTY_BYTE_ARRAY, EMPTY_BYTE_ARRAY); }
private List<List<Scan>> getParallelScans() throws SQLException { // If the scan boundaries are not matching with scan in context that means we need to get // parallel scans for the chunk after split/merge. if (!ScanUtil.isContextScan(scan, context)) { return getParallelScans(scan); } return getParallelScans(EMPTY_BYTE_ARRAY, EMPTY_BYTE_ARRAY); }
private List<PeekingResultIterator> recreateIterators(ConnectionQueryServices services, boolean isLocalIndex, Queue<PeekingResultIterator> allIterators, List<PeekingResultIterator> iterators, boolean isReverse, long maxQueryEndTime, ScanWrapper previousScan, boolean clearedCache, List<PeekingResultIterator> concatIterators, Iterator<Pair<Scan, Future<PeekingResultIterator>>> scanPairItr, Pair<Scan, Future<PeekingResultIterator>> scanPair, int retryCount) throws SQLException { scanPairItr.remove(); // Resubmit just this portion of work again Scan oldScan = scanPair.getFirst(); byte[] startKey = oldScan.getAttribute(SCAN_ACTUAL_START_ROW); byte[] endKey = oldScan.getStopRow(); List<List<Scan>> newNestedScans = this.getParallelScans(startKey, endKey); // Add any concatIterators that were successful so far // as we need these to be in order addIterator(iterators, concatIterators); concatIterators = Lists.newArrayList(); getIterators(newNestedScans, services, isLocalIndex, allIterators, iterators, isReverse, maxQueryEndTime, newNestedScans.size(), previousScan, retryCount); return concatIterators; }
private List<PeekingResultIterator> recreateIterators(ConnectionQueryServices services, boolean isLocalIndex, Queue<PeekingResultIterator> allIterators, List<PeekingResultIterator> iterators, boolean isReverse, long maxQueryEndTime, ScanWrapper previousScan, boolean clearedCache, List<PeekingResultIterator> concatIterators, Iterator<Pair<Scan, Future<PeekingResultIterator>>> scanPairItr, Pair<Scan, Future<PeekingResultIterator>> scanPair, int retryCount) throws SQLException { scanPairItr.remove(); // Resubmit just this portion of work again Scan oldScan = scanPair.getFirst(); byte[] startKey = oldScan.getAttribute(SCAN_ACTUAL_START_ROW); byte[] endKey = oldScan.getStopRow(); List<List<Scan>> newNestedScans = this.getParallelScans(startKey, endKey); // Add any concatIterators that were successful so far // as we need these to be in order addIterator(iterators, concatIterators); concatIterators = Lists.newArrayList(); getIterators(newNestedScans, services, isLocalIndex, allIterators, iterators, isReverse, maxQueryEndTime, newNestedScans.size(), previousScan, retryCount); return concatIterators; }
this.scans = getParallelScans(); List<KeyRange> splitRanges = Lists.newArrayListWithExpectedSize(scans.size() * ESTIMATED_GUIDEPOSTS_PER_REGION); for (List<Scan> scanList : scans) {
this.scans = getParallelScans(); List<KeyRange> splitRanges = Lists.newArrayListWithExpectedSize(scans.size() * ESTIMATED_GUIDEPOSTS_PER_REGION); for (List<Scan> scanList : scans) {