@Test public void testStartAndEndKeysNonDefault() { byte[] startKey = Bytes.toBytes(START_KEY); byte[] stopKey = Bytes.toBytes(STOP_KEY); Scan scan = new Scan().withStartRow(startKey, false).withStopRow(stopKey, true); scanAdapter.adapt(scan, throwingReadHooks, query); Assert.assertEquals( toRowSet( RowRange.newBuilder() .setStartKeyOpen(ByteStringer.wrap(startKey)) .setEndKeyClosed(ByteStringer.wrap(stopKey)) .build()), 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);  }