hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [3/5] hbase git commit: HBASE-16296 Reverse scan performance degrades when using filter lists (Ted Yu)
Date Tue, 02 Aug 2016 01:03:19 GMT
HBASE-16296 Reverse scan performance degrades when using filter lists (Ted Yu)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/b0b4592f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/b0b4592f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/b0b4592f

Branch: refs/heads/branch-1.3
Commit: b0b4592f1b4eaa87a94d4af09ae7bd3681a39ad1
Parents: 6dfaed9
Author: Andrew Purtell <apurtell@apache.org>
Authored: Mon Aug 1 11:13:47 2016 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Mon Aug 1 17:41:09 2016 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/regionserver/HRegion.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b0b4592f/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index a3610d1..91917de 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -6022,6 +6022,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
           // Technically, if we hit limits before on this row, we don't need this call.
           if (filterRowKey(currentRow, offset, length)) {
             incrementCountOfRowsFilteredMetric(scannerContext);
+            // early check, see HBASE-16296
+            if (isFilterDoneInternal()) {
+              return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();
+            }
             // Typically the count of rows scanned is incremented inside #populateResult.
However,
             // here we are filtering a row based purely on its row key, preventing us from
calling
             // #populateResult. Thus, perform the necessary increment here to rows scanned
metric


Mime
View raw message