hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From open...@apache.org
Subject hbase git commit: HBASE-15410 (addendum) Utilize the max seek value when all Filters in MUST_PASS_ALL FilterList return SEEK_NEXT_USING_HINT
Date Thu, 26 Oct 2017 10:51:26 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 1b70751c9 -> a93e1aa8f


HBASE-15410 (addendum) Utilize the max seek value when all Filters in MUST_PASS_ALL FilterList
return SEEK_NEXT_USING_HINT


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

Branch: refs/heads/branch-2
Commit: a93e1aa8f61a3d0818a7eb1a235c9ef74f2efbfb
Parents: 1b70751
Author: huzheng <openinx@gmail.com>
Authored: Thu Oct 26 18:40:05 2017 +0800
Committer: huzheng <openinx@gmail.com>
Committed: Thu Oct 26 18:46:49 2017 +0800

----------------------------------------------------------------------
 .../hadoop/hbase/filter/FilterListWithAND.java       | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/a93e1aa8/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterListWithAND.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterListWithAND.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterListWithAND.java
index 9217ff9..755dd98 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterListWithAND.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterListWithAND.java
@@ -23,9 +23,8 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.yetus.audience.InterfaceAudience;
 
 import java.io.IOException;
-import java.util.HashSet;
+import java.util.ArrayList;
 import java.util.List;
-import java.util.Set;
 
 /**
  * FilterListWithAND represents an ordered list of filters which will be evaluated with an
AND
@@ -34,7 +33,7 @@ import java.util.Set;
 @InterfaceAudience.Private
 public class FilterListWithAND extends FilterListBase {
 
-  private Set<Filter> seekHintFilter = new HashSet<>();
+  private List<Filter> seekHintFilters = new ArrayList<>();
 
   public FilterListWithAND(List<Filter> filters) {
     super(filters);
@@ -155,7 +154,7 @@ public class FilterListWithAND extends FilterListBase {
     ReturnCode rc = ReturnCode.INCLUDE;
     Cell transformed = transformedCell;
     this.referenceCell = c;
-    this.seekHintFilter.clear();
+    this.seekHintFilters.clear();
     for (int i = 0, n = filters.size(); i < n; i++) {
       Filter filter = filters.get(i);
       if (filter.filterAllRemaining()) {
@@ -175,11 +174,11 @@ public class FilterListWithAND extends FilterListBase {
         transformed = filter.transformCell(transformed);
       }
       if (localRC == ReturnCode.SEEK_NEXT_USING_HINT) {
-        seekHintFilter.add(filter);
+        seekHintFilters.add(filter);
       }
     }
     this.transformedCell = transformed;
-    if (!seekHintFilter.isEmpty()) {
+    if (!seekHintFilters.isEmpty()) {
       return ReturnCode.SEEK_NEXT_USING_HINT;
     }
     return rc;
@@ -190,7 +189,7 @@ public class FilterListWithAND extends FilterListBase {
     for (int i = 0, n = filters.size(); i < n; i++) {
       filters.get(i).reset();
     }
-    seekHintFilter.clear();
+    seekHintFilters.clear();
   }
 
   @Override
@@ -259,7 +258,7 @@ public class FilterListWithAND extends FilterListBase {
       return super.getNextCellHint(currentCell);
     }
     Cell maxHint = null;
-    for (Filter filter : seekHintFilter) {
+    for (Filter filter : seekHintFilters) {
       if (filter.filterAllRemaining()) {
         continue;
       }


Mime
View raw message