static RegionLocateType getLocateType(Scan scan) { if (scan.isReversed()) { if (isEmptyStartRow(scan.getStartRow())) { return RegionLocateType.BEFORE; } else { return scan.includeStartRow() ? RegionLocateType.CURRENT : RegionLocateType.BEFORE; } } else { return scan.includeStartRow() ? RegionLocateType.CURRENT : RegionLocateType.AFTER; } }
static boolean noMoreResultsForReverseScan(Scan scan, RegionInfo info) { if (isEmptyStartRow(info.getStartKey())) { return true; } if (isEmptyStopRow(scan.getStopRow())) { return false; } // no need to test the inclusive of the stop row as the start key of a region is included in // the region. return Bytes.compareTo(info.getStartKey(), scan.getStopRow()) <= 0; }
@Override protected ScannerCallable createScannerCallable() { if (!scan.includeStartRow() && !isEmptyStartRow(scan.getStartRow())) { // we have not implemented locate to next row for sync client yet, so here we change the // inclusive of start row to true. scan.withStartRow(createClosestRowAfter(scan.getStartRow()), true); } return new ScannerCallable(getConnection(), getTable(), scan, this.scanMetrics, this.rpcControllerFactory); } }
private void assertLocs(List<CompletableFuture<RegionLocations>> futures) throws InterruptedException, ExecutionException { assertEquals(256, futures.size()); for (int i = 0; i < futures.size(); i++) { HRegionLocation loc = futures.get(i).get().getDefaultRegionLocation(); if (i == 0) { assertTrue(isEmptyStartRow(loc.getRegion().getStartKey())); } else { assertEquals(String.format("%02x", i), Bytes.toString(loc.getRegion().getStartKey())); } if (i == futures.size() - 1) { assertTrue(isEmptyStopRow(loc.getRegion().getEndKey())); } else { assertEquals(String.format("%02x", i + 1), Bytes.toString(loc.getRegion().getEndKey())); } } }
if (scan.includeStartRow() && !isEmptyStartRow(getRow())) {
static RegionLocateType getLocateType(Scan scan) { if (scan.isReversed()) { if (isEmptyStartRow(scan.getStartRow())) { return RegionLocateType.BEFORE; } else { return scan.includeStartRow() ? RegionLocateType.CURRENT : RegionLocateType.BEFORE; } } else { return scan.includeStartRow() ? RegionLocateType.CURRENT : RegionLocateType.AFTER; } }
static boolean noMoreResultsForReverseScan(Scan scan, RegionInfo info) { if (isEmptyStartRow(info.getStartKey())) { return true; } if (isEmptyStopRow(scan.getStopRow())) { return false; } // no need to test the inclusive of the stop row as the start key of a region is included in // the region. return Bytes.compareTo(info.getStartKey(), scan.getStopRow()) <= 0; }
@Override protected ScannerCallable createScannerCallable() { if (!scan.includeStartRow() && !isEmptyStartRow(scan.getStartRow())) { // we have not implemented locate to next row for sync client yet, so here we change the // inclusive of start row to true. scan.withStartRow(createClosestRowAfter(scan.getStartRow()), true); } return new ScannerCallable(getConnection(), getTable(), scan, this.scanMetrics, this.rpcControllerFactory); } }
if (scan.includeStartRow() && !isEmptyStartRow(getRow())) {
static RegionLocateType getLocateType(Scan scan) { if (scan.isReversed()) { if (isEmptyStartRow(scan.getStartRow())) { return RegionLocateType.BEFORE; } else { return scan.includeStartRow() ? RegionLocateType.CURRENT : RegionLocateType.BEFORE; } } else { return scan.includeStartRow() ? RegionLocateType.CURRENT : RegionLocateType.AFTER; } }
static boolean noMoreResultsForReverseScan(Scan scan, RegionInfo info) { if (isEmptyStartRow(info.getStartKey())) { return true; } if (isEmptyStopRow(scan.getStopRow())) { return false; } // no need to test the inclusive of the stop row as the start key of a region is included in // the region. return Bytes.compareTo(info.getStartKey(), scan.getStopRow()) <= 0; }
@Override protected ScannerCallable createScannerCallable() { if (!scan.includeStartRow() && !isEmptyStartRow(scan.getStartRow())) { // we have not implemented locate to next row for sync client yet, so here we change the // inclusive of start row to true. scan.withStartRow(createClosestRowAfter(scan.getStartRow()), true); } return new ScannerCallable(getConnection(), getTable(), scan, this.scanMetrics, this.rpcControllerFactory); } }
private void assertLocs(List<CompletableFuture<HRegionLocation>> futures) throws InterruptedException, ExecutionException { assertEquals(256, futures.size()); for (int i = 0; i < futures.size(); i++) { HRegionLocation loc = futures.get(i).get(); if (i == 0) { assertTrue(isEmptyStartRow(loc.getRegion().getStartKey())); } else { assertEquals(String.format("%02x", i), Bytes.toString(loc.getRegion().getStartKey())); } if (i == futures.size() - 1) { assertTrue(isEmptyStopRow(loc.getRegion().getEndKey())); } else { assertEquals(String.format("%02x", i + 1), Bytes.toString(loc.getRegion().getEndKey())); } } }
if (scan.includeStartRow() && !isEmptyStartRow(getRow())) {