HBASE-21590 Optimize trySkipToNextColumn in StoreScanner a bit. (addendum)
This commit is contained in:
parent
2b003c5d68
commit
491153488e
|
@ -807,8 +807,9 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
|
||||||
Cell previousIndexedKey = null;
|
Cell previousIndexedKey = null;
|
||||||
do {
|
do {
|
||||||
Cell nextIndexedKey = getNextIndexedKey();
|
Cell nextIndexedKey = getNextIndexedKey();
|
||||||
if (nextIndexedKey != null && nextIndexedKey != KeyValueScanner.NO_NEXT_INDEXED_KEY
|
if (nextIndexedKey != null && nextIndexedKey != KeyValueScanner.NO_NEXT_INDEXED_KEY &&
|
||||||
&& (nextIndexedKey == previousIndexedKey || matcher.compareKeyForNextRow(nextIndexedKey, cell) >= 0)) {
|
(nextIndexedKey == previousIndexedKey ||
|
||||||
|
matcher.compareKeyForNextRow(nextIndexedKey, cell) >= 0)) {
|
||||||
this.heap.next();
|
this.heap.next();
|
||||||
++kvsScanned;
|
++kvsScanned;
|
||||||
previousIndexedKey = nextIndexedKey;
|
previousIndexedKey = nextIndexedKey;
|
||||||
|
@ -832,8 +833,9 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner
|
||||||
Cell previousIndexedKey = null;
|
Cell previousIndexedKey = null;
|
||||||
do {
|
do {
|
||||||
Cell nextIndexedKey = getNextIndexedKey();
|
Cell nextIndexedKey = getNextIndexedKey();
|
||||||
if (nextIndexedKey != null && nextIndexedKey != KeyValueScanner.NO_NEXT_INDEXED_KEY
|
if (nextIndexedKey != null && nextIndexedKey != KeyValueScanner.NO_NEXT_INDEXED_KEY &&
|
||||||
&& (nextIndexedKey == previousIndexedKey || matcher.compareKeyForNextColumn(nextIndexedKey, cell) >= 0)) {
|
(nextIndexedKey == previousIndexedKey ||
|
||||||
|
matcher.compareKeyForNextColumn(nextIndexedKey, cell) >= 0)) {
|
||||||
this.heap.next();
|
this.heap.next();
|
||||||
++kvsScanned;
|
++kvsScanned;
|
||||||
previousIndexedKey = nextIndexedKey;
|
previousIndexedKey = nextIndexedKey;
|
||||||
|
|
Loading…
Reference in New Issue