accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1400201 - in /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock: MockBatchScanner.java MockScanner.java
Date Fri, 19 Oct 2012 18:11:39 GMT
Author: ecn
Date: Fri Oct 19 18:11:39 2012
New Revision: 1400201

URL: http://svn.apache.org/viewvc?rev=1400201&view=rev
Log:
ACCUMULO-821 RangesFilter no longer needed

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java?rev=1400201&r1=1400200&r2=1400201&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java
Fri Oct 19 18:11:39 2012
@@ -24,12 +24,9 @@ import java.util.List;
 import java.util.Map.Entry;
 
 import org.apache.accumulo.core.client.BatchScanner;
-import org.apache.accumulo.core.client.mock.MockScanner.RangeFilter;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.iterators.Filter;
-import org.apache.accumulo.core.iterators.IteratorEnvironment;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iterators.SortedMapIterator;
 import org.apache.accumulo.core.security.Authorizations;
@@ -52,28 +49,6 @@ public class MockBatchScanner extends Mo
     this.ranges = new ArrayList<Range>(ranges);
   }
   
-  static class RangesFilter extends Filter {
-    List<Range> ranges;
-    
-    public RangesFilter deepCopy(IteratorEnvironment env) {
-      return new RangesFilter(getSource().deepCopy(env), ranges);
-    }
-    
-    public RangesFilter(SortedKeyValueIterator<Key,Value> iterator, List<Range>
ranges) {
-      setSource(iterator);
-      this.ranges = ranges;
-    }
-    
-    @Override
-    public boolean accept(Key k, Value v) {
-      for (Range r : ranges) {
-        if (r.contains(k))
-          return true;
-      }
-      return false;
-    }
-  }
-  
   @SuppressWarnings("unchecked")
   @Override
   public Iterator<Entry<Key,Value>> iterator() {
@@ -83,7 +58,7 @@ public class MockBatchScanner extends Mo
 
     IteratorChain chain = new IteratorChain();
     for (Range range : ranges) {
-      SortedKeyValueIterator<Key,Value> i = new RangesFilter(new SortedMapIterator(table.table),
ranges);
+      SortedKeyValueIterator<Key,Value> i = new SortedMapIterator(table.table);
       try {
         i = createFilter(i);
         i.seek(range, createColumnBSS(fetchedColumns), !fetchedColumns.isEmpty());

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java?rev=1400201&r1=1400200&r2=1400201&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java
Fri Oct 19 18:11:39 2012
@@ -26,10 +26,8 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.Filter;
-import org.apache.accumulo.core.iterators.IteratorEnvironment;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iterators.SortedMapIterator;
-import org.apache.accumulo.core.iterators.system.DeletingIterator;
 import org.apache.accumulo.core.security.Authorizations;
 
 public class MockScanner extends MockScannerBase implements Scanner {



Mime
View raw message