org.apache.hadoop.hbase.mapreduce.TableRecordReader Java Examples
The following examples show how to use
org.apache.hadoop.hbase.mapreduce.TableRecordReader.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TableInputFormat.java From stratosphere with Apache License 2.0 | 5 votes |
@Override public void open(TableInputSplit split) throws IOException { if (split == null) { throw new IOException("Input split is null!"); } if (this.table == null) { throw new IOException("No HTable provided!"); } if (this.scan == null) { throw new IOException("No Scan instance provided"); } this.tableRecordReader = new TableRecordReader(); this.tableRecordReader.setHTable(this.table); Scan sc = new Scan(this.scan); sc.setStartRow(split.getStartRow()); LOG.info("split start row: " + new String(split.getStartRow())); sc.setStopRow(split.getEndRow()); LOG.info("split end row: " + new String(split.getEndRow())); this.tableRecordReader.setScan(sc); this.tableRecordReader.restart(split.getStartRow()); this.hbaseKey = new HBaseKey(); this.hbaseResult = new HBaseResult(); endReached = false; }