From 47099d1b17ec2d69e8ebd9b4bfb26ca25af1725f Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Fri, 14 Dec 2018 11:23:36 -0600 Subject: [PATCH] HBASE-21590 Optimize trySkipToNextColumn in StoreScanner a bit. (addendum) (cherry picked from commit a284c493b127fbf785fbee401f0854ad1979eb26) (cherry picked from commit aa36c3f6b69ef47b6f53158eda4a87e1a72e4fad) --- .../apache/hadoop/hbase/regionserver/StoreScanner.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java index bc457df6eac..d7777061a56 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java @@ -813,8 +813,9 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner Cell previousIndexedKey = null; do { Cell nextIndexedKey = getNextIndexedKey(); - if (nextIndexedKey != null && nextIndexedKey != KeyValueScanner.NO_NEXT_INDEXED_KEY - && (nextIndexedKey == previousIndexedKey || matcher.compareKeyForNextRow(nextIndexedKey, cell) >= 0)) { + if (nextIndexedKey != null && nextIndexedKey != KeyValueScanner.NO_NEXT_INDEXED_KEY && + (nextIndexedKey == previousIndexedKey || + matcher.compareKeyForNextRow(nextIndexedKey, cell) >= 0)) { this.heap.next(); ++kvsScanned; previousIndexedKey = nextIndexedKey; @@ -838,8 +839,9 @@ public class StoreScanner extends NonReversedNonLazyKeyValueScanner Cell previousIndexedKey = null; do { Cell nextIndexedKey = getNextIndexedKey(); - if (nextIndexedKey != null && nextIndexedKey != KeyValueScanner.NO_NEXT_INDEXED_KEY - && (nextIndexedKey == previousIndexedKey || matcher.compareKeyForNextColumn(nextIndexedKey, cell) >= 0)) { + if (nextIndexedKey != null && nextIndexedKey != KeyValueScanner.NO_NEXT_INDEXED_KEY && + (nextIndexedKey == previousIndexedKey || + matcher.compareKeyForNextColumn(nextIndexedKey, cell) >= 0)) { this.heap.next(); ++kvsScanned; previousIndexedKey = nextIndexedKey;