/** * Set the row when there is change in row * @param currentRow */ public void setToNewRow(Cell currentRow) { this.currentRow = currentRow; columns.reset(); reset(); }
/** * hbase-2259 */ @Test public void testStackOverflow() throws IOException { int maxVersions = 1; TreeSet<byte[]> columns = new TreeSet<>(Bytes.BYTES_COMPARATOR); for (int i = 0; i < 100000; i++) { columns.add(Bytes.toBytes("col" + i)); } ColumnTracker explicit = new ExplicitColumnTracker(columns, 0, maxVersions, Long.MIN_VALUE); for (int i = 0; i < 100000; i += 2) { byte[] col = Bytes.toBytes("col" + i); ScanQueryMatcher.checkColumn(explicit, col, 0, col.length, 1, KeyValue.Type.Put.getCode(), false); } explicit.reset(); for (int i = 1; i < 100000; i += 2) { byte[] col = Bytes.toBytes("col" + i); ScanQueryMatcher.checkColumn(explicit, col, 0, col.length, 1, KeyValue.Type.Put.getCode(), false); } }
/** * hbase-2259 */ @Test public void testStackOverflow() throws IOException { int maxVersions = 1; TreeSet<byte[]> columns = new TreeSet<>(Bytes.BYTES_COMPARATOR); for (int i = 0; i < 100000; i++) { columns.add(Bytes.toBytes("col" + i)); } ColumnTracker explicit = new ExplicitColumnTracker(columns, 0, maxVersions, Long.MIN_VALUE); for (int i = 0; i < 100000; i += 2) { byte[] col = Bytes.toBytes("col" + i); ScanQueryMatcher.checkColumn(explicit, col, 0, col.length, 1, KeyValue.Type.Put.getCode(), false); } explicit.reset(); for (int i = 1; i < 100000; i += 2) { byte[] col = Bytes.toBytes("col" + i); ScanQueryMatcher.checkColumn(explicit, col, 0, col.length, 1, KeyValue.Type.Put.getCode(), false); } }