HBASE-582 HBase 554 forgot to clear results on each iteration caused by a filter

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@648798 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-04-16 19:23:41 +00:00
parent ebbdb04cc9
commit 9ad3122021
2 changed files with 10 additions and 1 deletions

View File

@ -7,6 +7,8 @@ Hbase Change Log
HBASE-12 When hbase regionserver restarts, it says "impossible state for
createLease()"
HBASE-575 master dies with stack overflow error if rootdir isn't qualified
HBASE-582 HBase 554 forgot to clear results on each iteration caused by a filter
(Clint Morgan via Stack)
IMPROVEMENTS
HBASE-559 MR example job to count table rows

View File

@ -1742,6 +1742,7 @@ public class HRegion implements HConstants {
public boolean next(HStoreKey key, SortedMap<Text, byte[]> results)
throws IOException {
boolean moreToFollow = false;
boolean filtered = false;
do {
// Find the lowest-possible key.
@ -1804,7 +1805,13 @@ public class HRegion implements HConstants {
// If we got no results, then there is no more to follow.
moreToFollow = false;
}
} while(filter != null && filter.filterNotNull(results) && moreToFollow);
filtered = filter == null ? false : filter.filterNotNull(results);
if (filtered && moreToFollow) {
results.clear();
}
} while(filtered && moreToFollow);
// Make sure scanners closed if no more results
if (!moreToFollow) {