@Test public void testLimit() { Scan scan = new Scan().setLimit(10); scanAdapter.adapt(scan, throwingReadHooks, query); int adaptedLimit = (int) query.toProto(requestContext).getRowsLimit(); Assert.assertEquals(scan.getLimit(), adaptedLimit); }
@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);  }