hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chia7...@apache.org
Subject hbase git commit: HBASE-16893 Use Collection.removeIf instead of Iterator.remove in DependentColumnFilter
Date Thu, 03 Aug 2017 05:48:51 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 bbe0e7684 -> da2cb0242


HBASE-16893 Use Collection.removeIf instead of Iterator.remove in DependentColumnFilter

Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>


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

Branch: refs/heads/branch-2
Commit: da2cb0242279b81f24b2bde86c6896acc05dd47d
Parents: bbe0e76
Author: Robert Yokota <rayokota@gmail.com>
Authored: Thu Aug 3 13:37:45 2017 +0800
Committer: Chia-Ping Tsai <chia7712@gmail.com>
Committed: Thu Aug 3 13:43:51 2017 +0800

----------------------------------------------------------------------
 .../apache/hadoop/hbase/filter/DependentColumnFilter.java | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/da2cb024/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/DependentColumnFilter.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/DependentColumnFilter.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/DependentColumnFilter.java
index 5717fc4..90d00dd 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/DependentColumnFilter.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/DependentColumnFilter.java
@@ -21,7 +21,6 @@ package org.apache.hadoop.hbase.filter;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
@@ -153,14 +152,7 @@ public class DependentColumnFilter extends CompareFilter {
 
   @Override
   public void filterRowCells(List<Cell> kvs) {
-    Iterator<? extends Cell> it = kvs.iterator();
-    Cell kv;
-    while(it.hasNext()) {
-      kv = it.next();
-      if(!stampSet.contains(kv.getTimestamp())) {
-        it.remove();
-      }
-    }
+    kvs.removeIf(kv -> !stampSet.contains(kv.getTimestamp()));
   }
 
   @Override


Mime
View raw message