下面列出了org.apache.hadoop.hbase.regionserver.KeyValueScanner#peek ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
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);
}
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);
}