incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject svn commit: r1202802 - in /incubator/accumulo/branches/1.4/src/core/src: main/java/org/apache/accumulo/core/iterators/Combiner.java test/java/org/apache/accumulo/core/iterators/CombinerTest.java
Date Wed, 16 Nov 2011 17:38:33 GMT
Author: billie
Date: Wed Nov 16 17:38:33 2011
New Revision: 1202802

URL: http://svn.apache.org/viewvc?rev=1202802&view=rev
Log:
ACCUMULO-151 changed default behavior of Combiner and modified default test

Modified:
    incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
    incubator/accumulo/branches/1.4/src/core/src/test/java/org/apache/accumulo/core/iterators/CombinerTest.java

Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java?rev=1202802&r1=1202801&r2=1202802&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
(original)
+++ incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java
Wed Nov 16 17:38:33 2011
@@ -152,15 +152,15 @@ public abstract class Combiner extends W
   private Key workKey = new Key();
   
   /*
-   * Sets the topKey and topValue based on the top key of the source. If the column of the
source top key is in the set of combiners, or if there are no columns
-   * in the set of combiners, topKey will be the top key of the source and topValue will
be the result of the reduce method. Otherwise, topKey and topValue will
-   * be null.
+   * Sets the topKey and topValue based on the top key of the source. If the column of the
source top key is in the set of combiners, topKey will be the top key
+   * of the source and topValue will be the result of the reduce method. Otherwise, topKey
and topValue will be unchanged. (They are always set to null before
+   * this method is called.)
    */
   private void findTop() throws IOException {
     // check if aggregation is needed
     if (super.hasTop()) {
       workKey.set(super.getTopKey());
-      if (combiners.isEmpty() || combiners.contains(workKey)) {
+      if (combiners.contains(workKey)) {
         if (workKey.isDeleted())
           return;
         topKey = workKey;

Modified: incubator/accumulo/branches/1.4/src/core/src/test/java/org/apache/accumulo/core/iterators/CombinerTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/test/java/org/apache/accumulo/core/iterators/CombinerTest.java?rev=1202802&r1=1202801&r2=1202802&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/core/src/test/java/org/apache/accumulo/core/iterators/CombinerTest.java
(original)
+++ incubator/accumulo/branches/1.4/src/core/src/test/java/org/apache/accumulo/core/iterators/CombinerTest.java
Wed Nov 16 17:38:33 2011
@@ -32,10 +32,6 @@ import org.apache.accumulo.core.data.Byt
 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.Combiner;
-import org.apache.accumulo.core.iterators.LongCombiner;
-import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
-import org.apache.accumulo.core.iterators.SortedMapIterator;
 import org.apache.accumulo.core.iterators.Combiner.ValueIterator;
 import org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder;
 import org.apache.accumulo.core.iterators.system.MultiIterator;
@@ -97,7 +93,6 @@ public class CombinerTest {
     
     Map<String,String> opts = new HashMap<String,String>();
     
-    opts.put(Combiner.COLUMN_PREFIX + "cf002", null);
     opts.put(SummingCombiner.TYPE, SummingCombiner.Type.VARNUM.name());
     
     ai.init(new SortedMapIterator(tm1), opts, null);



Mime
View raw message