@Override public boolean next(ImmutableBytesWritable key, Result value) throws IOException { return trr.next(key, value); } };
/** * Create table data and run tests on specified htable using the * o.a.h.hbase.mapred API. * * @param table * @throws IOException */ static void runTestMapred(Table table) throws IOException { org.apache.hadoop.hbase.mapred.TableRecordReader trr = new org.apache.hadoop.hbase.mapred.TableRecordReader(); trr.setStartRow("aaa".getBytes()); trr.setEndRow("zzz".getBytes()); trr.setHTable(table); trr.setInputColumns(columns); trr.init(); Result r = new Result(); ImmutableBytesWritable key = new ImmutableBytesWritable(); boolean more = trr.next(key, r); assertTrue(more); checkResult(r, key, "aaa".getBytes(), "value aaa".getBytes()); more = trr.next(key, r); assertTrue(more); checkResult(r, key, "bbb".getBytes(), "value bbb".getBytes()); // no more data more = trr.next(key, r); assertFalse(more); }
@Override public boolean next(ImmutableBytesWritable key, Result value) throws IOException { return trr.next(key, value); } };
@Override public boolean next(ImmutableBytesWritable key, Result value) throws IOException { return trr.next(key, value); } };
@Override public boolean next(ImmutableBytesWritable key, Result value) throws IOException { return trr.next(key, value); } };
/** * Create table data and run tests on specified htable using the * o.a.h.hbase.mapred API. * * @param table * @throws IOException */ static void runTestMapred(Table table) throws IOException { org.apache.hadoop.hbase.mapred.TableRecordReader trr = new org.apache.hadoop.hbase.mapred.TableRecordReader(); trr.setStartRow("aaa".getBytes()); trr.setEndRow("zzz".getBytes()); trr.setHTable(table); trr.setInputColumns(columns); trr.init(); Result r = new Result(); ImmutableBytesWritable key = new ImmutableBytesWritable(); boolean more = trr.next(key, r); assertTrue(more); checkResult(r, key, "aaa".getBytes(), "value aaa".getBytes()); more = trr.next(key, r); assertTrue(more); checkResult(r, key, "bbb".getBytes(), "value bbb".getBytes()); // no more data more = trr.next(key, r); assertFalse(more); }
/** * Create table data and run tests on specified htable using the * o.a.h.hbase.mapred API. * * @param table * @throws IOException */ static void runTestMapred(Table table) throws IOException { org.apache.hadoop.hbase.mapred.TableRecordReader trr = new org.apache.hadoop.hbase.mapred.TableRecordReader(); trr.setStartRow("aaa".getBytes()); trr.setEndRow("zzz".getBytes()); trr.setHTable(table); trr.setInputColumns(columns); trr.init(); Result r = new Result(); ImmutableBytesWritable key = new ImmutableBytesWritable(); boolean more = trr.next(key, r); assertTrue(more); checkResult(r, key, "aaa".getBytes(), "value aaa".getBytes()); more = trr.next(key, r); assertTrue(more); checkResult(r, key, "bbb".getBytes(), "value bbb".getBytes()); // no more data more = trr.next(key, r); assertFalse(more); }