@ReadOnly @Override public CloseableIterator<KeyValue<byte[], T>> scan(@Nullable String startRow, @Nullable String stopRow) { return scan(startRow == null ? null : Bytes.toBytes(startRow), stopRow == null ? null : Bytes.toBytes(stopRow)); }
@ReadOnly @Override public CloseableIterator<KeyValue<byte[], T>> scan(@Nullable String startRow, @Nullable String stopRow) { return scan(startRow == null ? null : Bytes.toBytes(startRow), stopRow == null ? null : Bytes.toBytes(stopRow)); }
@Override public void apply() throws Exception { CloseableIterator<KeyValue<byte[], Record>> results = records.scan((String) null, null); while (results.hasNext()) { actualList.add(results.next()); } results.close(); } });
@Override public void apply() throws Exception { Scan scan = new Scan(null, null); CloseableIterator<KeyValue<byte[], Record>> results = records.scan(scan); while (results.hasNext()) { actualList.add(results.next()); } } });
@Override public void apply() throws Exception { CloseableIterator<KeyValue<byte[], Record>> results = records.scan("789", null); KeyValue<byte[], Record> actualRecord = results.next(); Assert.assertFalse(results.hasNext()); Assert.assertArrayEquals(actualRecord.getKey(), recordList.get(2).getKey()); Assert.assertEquals(actualRecord.getValue(), recordList.get(2).getValue()); results.close(); results = records.scan(null, "124"); actualRecord = results.next(); Assert.assertFalse(results.hasNext()); Assert.assertArrayEquals(actualRecord.getKey(), recordList.get(0).getKey()); Assert.assertEquals(actualRecord.getValue(), recordList.get(0).getValue()); results.close(); results = records.scan(null, "123"); Assert.assertFalse(results.hasNext()); results.close(); } });