incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject svn commit: r1208119 - in /incubator/accumulo/trunk: ./ src/core/src/main/java/org/apache/accumulo/core/iterators/ src/core/src/main/java/org/apache/accumulo/core/iterators/user/ src/core/src/test/java/org/apache/accumulo/core/iterators/user/
Date Tue, 29 Nov 2011 22:39:29 GMT
Author: billie
Date: Tue Nov 29 22:39:28 2011
New Revision: 1208119

URL: http://svn.apache.org/viewvc?rev=1208119&view=rev
Log:
ACCUMULO-167 merged to trunk

Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/LongCombiner.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java
    incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov 29 22:39:28 2011
@@ -1,2 +1,2 @@
 /incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031
-/incubator/accumulo/branches/1.4:1201902-1208095
+/incubator/accumulo/branches/1.4:1201902-1208117

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/LongCombiner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/LongCombiner.java?rev=1208119&r1=1208118&r2=1208119&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/LongCombiner.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/LongCombiner.java
Tue Nov 29 22:39:28 2011
@@ -48,7 +48,7 @@ public abstract class LongCombiner exten
   protected static final String CLASS_PREFIX = "class:";
   
   public static enum Type {
-    VARNUM, LONG, STRING
+    VARLEN, FIXEDLEN, STRING
   }
   
   @Override
@@ -79,10 +79,10 @@ public abstract class LongCombiner exten
       }
     } else {
       switch (Type.valueOf(type)) {
-        case VARNUM:
+        case VARLEN:
           encoder = VAR_LEN_ENCODER;
           return;
-        case LONG:
+        case FIXEDLEN:
           encoder = FIXED_LEN_ENCODER;
           return;
         case STRING:
@@ -97,9 +97,9 @@ public abstract class LongCombiner exten
   @Override
   public IteratorOptions describeOptions() {
     IteratorOptions io = super.describeOptions();
-    io.setName("typedcombiner");
-    io.setDescription("TypedValueCombiner can interpret Values as a variety of number encodings
(VLong, Long, or String) before combining");
-    io.addNamedOption(TYPE, "<VARNUM|LONG|STRING>");
+    io.setName("longcombiner");
+    io.setDescription("LongCombiner can interpret Values as Longs in a variety of encodings
(variable length, fixed length, or string) before combining");
+    io.addNamedOption(TYPE, "<VARLEN|FIXEDLEN|STRING|fullClassName>");
     return io;
   }
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java?rev=1208119&r1=1208118&r2=1208119&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java
Tue Nov 29 22:39:28 2011
@@ -49,7 +49,7 @@ public class SummingArrayCombiner extend
   private static final String CLASS_PREFIX = "class:";
   
   public static enum Type {
-    VARNUM, LONG, STRING
+    VARLEN, FIXEDLEN, STRING
   }
   
   @Override
@@ -104,10 +104,10 @@ public class SummingArrayCombiner extend
       }
     } else {
       switch (Type.valueOf(options.get(TYPE))) {
-        case VARNUM:
+        case VARLEN:
           encoder = new VarLongArrayEncoder();
           return;
-        case LONG:
+        case FIXEDLEN:
           encoder = new FixedLongArrayEncoder();
           return;
         case STRING:
@@ -122,9 +122,9 @@ public class SummingArrayCombiner extend
   @Override
   public IteratorOptions describeOptions() {
     IteratorOptions io = super.describeOptions();
-    io.setName("typedcombiner");
-    io.setDescription("TypedValueCombiner can interpret Values as a variety of number encodings
(VLong, Long, or String) before combining");
-    io.addNamedOption(TYPE, "<VARNUM|LONG|STRING>");
+    io.setName("summingarraycombiner");
+    io.setDescription("SummingArrayCombiner can interpret Values as arrays of Longs using
a variety of encodings (arrays of variable length longs or fixed length longs, or comma-separated
strings) before combining");
+    io.addNamedOption(TYPE, "<VARLEN|FIXEDLEN|STRING|fullClassName>");
     return io;
   }
   

Modified: incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java?rev=1208119&r1=1208118&r2=1208119&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
(original)
+++ incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
Tue Nov 29 22:39:28 2011
@@ -92,7 +92,7 @@ public class CombinerTest {
     Combiner ai = new SummingCombiner();
     
     IteratorSetting is = new IteratorSetting(1, SummingCombiner.class);
-    LongCombiner.setEncodingType(is, SummingCombiner.Type.VARNUM);
+    LongCombiner.setEncodingType(is, SummingCombiner.Type.VARLEN);
     Combiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("2")));
     
     ai.init(new SortedMapIterator(tm1), is.getProperties(), null);
@@ -422,7 +422,7 @@ public class CombinerTest {
     Combiner ai = new SummingCombiner();
     
     IteratorSetting is = new IteratorSetting(1, SummingCombiner.class);
-    LongCombiner.setEncodingType(is, SummingCombiner.Type.LONG);
+    LongCombiner.setEncodingType(is, SummingCombiner.Type.FIXEDLEN);
     Combiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("cf001")));
     
     ai.init(new SortedMapIterator(tm1), is.getProperties(), new DefaultIteratorEnvironment());
@@ -483,7 +483,7 @@ public class CombinerTest {
     Combiner ai = new MaxCombiner();
     
     IteratorSetting is = new IteratorSetting(1, SummingCombiner.class);
-    LongCombiner.setEncodingType(is, SummingCombiner.Type.VARNUM);
+    LongCombiner.setEncodingType(is, SummingCombiner.Type.VARLEN);
     Combiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("cf001")));
     
     ai.init(new SortedMapIterator(tm1), is.getProperties(), null);
@@ -525,7 +525,7 @@ public class CombinerTest {
       assertEquals(a[i], b[i]);
   }
   
-  public static void sumArray(Class<? extends Encoder<List<Long>>> encoderClass,
String type) throws IOException, InstantiationException,
+  public static void sumArray(Class<? extends Encoder<List<Long>>> encoderClass,
SummingArrayCombiner.Type type) throws IOException, InstantiationException,
       IllegalAccessException {
     Encoder<List<Long>> encoder = encoderClass.newInstance();
     
@@ -539,7 +539,7 @@ public class CombinerTest {
     Combiner ai = new SummingArrayCombiner();
     
     IteratorSetting is = new IteratorSetting(1, SummingArrayCombiner.class);
-    SummingArrayCombiner.setEncodingType(is, SummingArrayCombiner.Type.valueOf(type));
+    SummingArrayCombiner.setEncodingType(is, type);
     Combiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("cf001")));
     
     ai.init(new SortedMapIterator(tm1), is.getProperties(), null);
@@ -586,8 +586,8 @@ public class CombinerTest {
   
   @Test
   public void sumArrayTest() throws IOException, InstantiationException, IllegalAccessException
{
-    sumArray(SummingArrayCombiner.VarLongArrayEncoder.class, "VARNUM");
-    sumArray(SummingArrayCombiner.FixedLongArrayEncoder.class, "LONG");
-    sumArray(SummingArrayCombiner.StringArrayEncoder.class, "STRING");
+    sumArray(SummingArrayCombiner.VarLongArrayEncoder.class, SummingArrayCombiner.Type.VARLEN);
+    sumArray(SummingArrayCombiner.FixedLongArrayEncoder.class, SummingArrayCombiner.Type.FIXEDLEN);
+    sumArray(SummingArrayCombiner.StringArrayEncoder.class, SummingArrayCombiner.Type.STRING);
   }
 }



Mime
View raw message