Java Code Examples for org.apache.hadoop.hbase.regionserver.KeyValueScanner#peek()

The following examples show how to use org.apache.hadoop.hbase.regionserver.KeyValueScanner#peek() . 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: LocalTableState.java    From phoenix with Apache License 2.0 5 votes vote down vote up
public Result getCurrentRowState() {
  KeyValueScanner scanner = this.memstore.getScanner();
  List<Cell> kvs = new ArrayList<Cell>();
  while (scanner.peek() != null) {
    try {
      kvs.add(scanner.next());
    } catch (IOException e) {
      // this should never happen - something has gone terribly arwy if it has
      throw new RuntimeException("Local MemStore threw IOException!");
    }
  }
  return Result.create(kvs);
}
 
Example 2
Source File: LocalTableState.java    From phoenix with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public Result getCurrentRowState() {
  KeyValueScanner scanner = this.memstore.getScanner();
  List<KeyValue> kvs = new ArrayList<KeyValue>();
  while (scanner.peek() != null) {
    try {
      kvs.add(scanner.next());
    } catch (IOException e) {
      // this should never happen - something has gone terribly arwy if it has
      throw new RuntimeException("Local MemStore threw IOException!");
    }
  }
  return new Result(kvs);
}