Repository: hbase
Updated Branches:
  refs/heads/HBASE-18467 eec17ac01 -> 26eb5a2c2 (forced update)


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

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


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

Branch: refs/heads/HBASE-18467
Commit: 855dd48f0a65e7db7263c076d7ed078bf1295ec5
Parents: 504a1f1
Author: Robert Yokota <rayok...@gmail.com>
Authored: Thu Aug 3 13:37:45 2017 +0800
Committer: Chia-Ping Tsai <chia7...@gmail.com>
Committed: Thu Aug 3 13:38:52 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/855dd48f/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

Reply via email to