HBASE-6577 RegionScannerImpl.nextRow() should seek to next row

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1373531 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
larsh 2012-08-15 17:23:44 +00:00
parent 677ff7e0db
commit e5b1ae1916
1 changed files with 4 additions and 5 deletions

View File

@ -3603,7 +3603,7 @@ public class HRegion implements HeapSize { // , Writable{
// there're no left overs. // there're no left overs.
// the reasons for calling this method are: // the reasons for calling this method are:
// 1. reset the filters. // 1. reset the filters.
// 2. provide a hook to fast forward the row (used by subclasses) // 2. fast forward the row
nextRow(currentRow); nextRow(currentRow);
// This row was totally filtered out, if this is NOT the last row, // This row was totally filtered out, if this is NOT the last row,
@ -3616,16 +3616,15 @@ public class HRegion implements HeapSize { // , Writable{
} }
} }
private boolean filterRow() {
return filter != null
&& filter.filterRow();
}
private boolean filterRowKey(byte[] row) { private boolean filterRowKey(byte[] row) {
return filter != null return filter != null
&& filter.filterRowKey(row, 0, row.length); && filter.filterRowKey(row, 0, row.length);
} }
protected void nextRow(byte [] currentRow) throws IOException { protected void nextRow(byte [] currentRow) throws IOException {
KeyValue kv = KeyValue.createLastOnRow(currentRow);
this.storeHeap.requestSeek(kv, true, true);
while (Bytes.equals(currentRow, peekRow())) { while (Bytes.equals(currentRow, peekRow())) {
this.storeHeap.next(MOCKED_LIST); this.storeHeap.next(MOCKED_LIST);
} }