HBASE-10805 Speed up KeyValueHeap.next() a bit
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1580149 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c4610ecab2
commit
2d17ce3999
|
@ -112,8 +112,8 @@ public class KeyValueHeap extends NonReversedNonLazyKeyValueScanner
|
|||
this.current = pollRealKV();
|
||||
} else {
|
||||
KeyValueScanner topScanner = this.heap.peek();
|
||||
if (topScanner == null ||
|
||||
this.comparator.compare(kvNext, topScanner.peek()) >= 0) {
|
||||
// no need to add current back to the heap if it is the only scanner left
|
||||
if (topScanner != null && this.comparator.compare(kvNext, topScanner.peek()) >= 0) {
|
||||
this.heap.add(this.current);
|
||||
this.current = pollRealKV();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue