@Test public void testToShowNPEOnRegionScannerReseek() throws Exception { byte[] family = Bytes.toBytes("family"); this.region = initHRegion(tableName, method, CONF, family); Put put = new Put(Bytes.toBytes("r1")); put.addColumn(family, Bytes.toBytes("q1"), Bytes.toBytes("v1")); region.put(put); put = new Put(Bytes.toBytes("r2")); put.addColumn(family, Bytes.toBytes("q1"), Bytes.toBytes("v1")); region.put(put); region.flush(true); Scan scan = new Scan(); scan.setMaxVersions(3); // open the first scanner RegionScanner scanner1 = region.getScanner(scan); System.out.println("Smallest read point:" + region.getSmallestReadPoint()); region.compact(true); scanner1.reseek(Bytes.toBytes("r2")); List<Cell> results = new ArrayList<>(); scanner1.next(results); Cell keyValue = results.get(0); Assert.assertTrue(Bytes.compareTo(CellUtil.cloneRow(keyValue), Bytes.toBytes("r2")) == 0); scanner1.close(); }
@Override public boolean reseek(byte[] row) throws IOException { return s.reseek(row); }
@Override public boolean reseek(byte[] row) throws IOException { return delegate.reseek(row); }
@Override public boolean reseek(byte[] row) throws IOException { return scanner.reseek(row); }
@Override public boolean reseek(byte[] row) throws IOException { return scanner.reseek(row); }
@Override public boolean reseek(byte[] row) throws IOException { return s.reseek(row); }
@Override public boolean reseek(byte[] row) throws IOException { return outerScanner.reseek(row); }
@Override public boolean reseek(byte[] row) throws IOException { return s.reseek(row); }
@Override public boolean reseek(byte[] row) throws IOException { return scanner.reseek(row); }
@Override public boolean reseek(byte[] row) throws IOException { return scanner.reseek(row); }
@Override public boolean reseek(final byte[] row) throws IOException { return ((RegionScanner) delegate).reseek(row); }
@Override public boolean reseek(byte[] bytes) throws IOException { if (baseRegionScanner != null) { return baseRegionScanner.reseek(bytes); } throw new IllegalStateException( "RegionScanner.reseek() called when the wrapped scanner is not a RegionScanner"); }
@Override public boolean reseek(byte[] bytes) throws IOException { if (baseRegionScanner != null) { return baseRegionScanner.reseek(bytes); } throw new IllegalStateException( "RegionScanner.reseek() called when the wrapped scanner is not a RegionScanner"); }
@Override public boolean reseek(byte[] bytes) throws IOException { if (baseRegionScanner != null) { return baseRegionScanner.reseek(bytes); } throw new IllegalStateException( "RegionScanner.reseek() called when the wrapped scanner is not a RegionScanner"); }
@Override public boolean reseek(byte[] bytes) throws IOException { if (baseRegionScanner != null) { return baseRegionScanner.reseek(bytes); } throw new IllegalStateException( "RegionScanner.reseek() called when the wrapped scanner is not a RegionScanner"); }
@Override public boolean reseek(byte[] bytes) throws IOException { if (baseRegionScanner != null) { return baseRegionScanner.reseek(bytes); } throw new IllegalStateException( "RegionScanner.reseek() called when the wrapped scanner is not a RegionScanner"); }
@Override public boolean reseek(byte[] bytes) throws IOException { if (baseRegionScanner != null) { return baseRegionScanner.reseek(bytes); } throw new IllegalStateException( "RegionScanner.reseek() called when the wrapped scanner is not a RegionScanner"); }
@Override public boolean reseek(byte[] bytes) throws IOException { if (baseRegionScanner != null) { return baseRegionScanner.reseek(bytes); } throw new IllegalStateException( "RegionScanner.reseek() called when the wrapped scanner is not a RegionScanner"); }
@Override public boolean reseek(byte[] bytes) throws IOException { if (baseRegionScanner != null) { return baseRegionScanner.reseek(bytes); } throw new IllegalStateException( "RegionScanner.reseek() called when the wrapped scanner is not a RegionScanner"); }