@Test public void testStopExclusive() { byte[] stopKey = Bytes.toBytes(STOP_KEY); Scan scan = new Scan().withStopRow(stopKey, false); scanAdapter.adapt(scan, throwingReadHooks, query); RowSet expected = toRowSet(RowRange.newBuilder().setEndKeyOpen(ByteString.copyFrom(stopKey)).build()); Assert.assertEquals(expected, query.toProto(requestContext).getRows()); }
@Override public void adapt(Scan scan, ReadHooks readHooks, Query query) { throwIfUnsupportedScan(scan); toByteStringRange(scan, query); query.filter(buildFilter(scan, readHooks)); if (LIMIT_AVAILABLE && scan.getLimit() > 0) { query.limit(scan.getLimit()); } }
ScanAdapter implements ReadOperationAdapter<Scan> { @Override public void adapt(Scan scan, ReadHooks readHooks, Query query) { throwIfUnsupportedScan(scan); toByteStringRange(scan, query); query.filter(buildFilter(scan, readHooks)); if (LIMIT_AVAILABLE && scan.getLimit() > 0) { query.limit(scan.getLimit()); } } }
ScanAdapter implements ReadOperationAdapter<Scan> { @Override public void adapt(Scan scan, ReadHooks readHooks, Query query) { throwIfUnsupportedScan(scan); toByteStringRange(scan, query); query.filter(buildFilter(scan, readHooks)); if (LIMIT_AVAILABLE && scan.getLimit() > 0) { query.limit(scan.getLimit()); } } ScanAdapter(FilterAdapter filterAdapter, RowRangeAdapter rowRangeAdapter); }
ScanAdapter implements ReadOperationAdapter<Scan> { @Override public void adapt(Scan scan, ReadHooks readHooks, Query query) { throwIfUnsupportedScan(scan); toByteStringRange(scan, query); query.filter(buildFilter(scan, readHooks)); if (LIMIT_AVAILABLE && scan.getLimit() > 0) { query.limit(scan.getLimit()); } } ScanAdapter(FilterAdapter filterAdapter, RowRangeAdapter rowRangeAdapter); void throwIfUnsupportedScan(Scan scan); Filters.Filter buildFilter(Scan scan, ReadHooks hooks); @Override void adapt(Scan scan, ReadHooks readHooks, Query query); }
ScanAdapter implements ReadOperationAdapter<Scan> { @Override public void adapt(Scan scan, ReadHooks readHooks, Query query) { throwIfUnsupportedScan(scan); toByteStringRange(scan, query); query.filter(buildFilter(scan, readHooks)); if (LIMIT_AVAILABLE && scan.getLimit() > 0) { query.limit(scan.getLimit()); } } ScanAdapter(FilterAdapter filterAdapter, RowRangeAdapter rowRangeAdapter); void throwIfUnsupportedScan(Scan scan); Filters.Filter buildFilter(Scan scan, ReadHooks hooks); @Override void adapt(Scan scan, ReadHooks readHooks, Query query);  }