accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject svn commit: r1205076 - in /incubator/accumulo/trunk: ./ src/assemble/ src/assemble/target/ src/core/src/main/java/org/apache/accumulo/core/client/mock/ src/core/src/main/java/org/apache/accumulo/core/iterators/ src/core/src/main/java/org/apache/accumul...
Date Tue, 22 Nov 2011 16:50:51 GMT
Author: billie
Date: Tue Nov 22 16:50:49 2011
New Revision: 1205076

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

Removed:
    incubator/accumulo/trunk/src/assemble/target/
    incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/filter/
Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/src/assemble/   (props changed)
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/Aggregator.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/LongSummation.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumArraySummation.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumSummation.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMax.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMin.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringSummation.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfiguration.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorSet.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/VersioningIterator.java
    incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/admin/TableOperationsHelperTest.java
    incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/AggregatingIteratorTest.java
    incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/VersioningIteratorTest.java
    incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/NumSummationTest.java
    incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfigurationTest.java

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov 22 16:50:49 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
-/incubator/accumulo/branches/1.4:1201902-1204786
+/incubator/accumulo/branches/1.4:1201902-1205055

Propchange: incubator/accumulo/trunk/src/assemble/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Nov 22 16:50:49 2011
@@ -1,3 +1,5 @@
+target
+
 .settings
 
 .project

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
Tue Nov 22 16:50:49 2011
@@ -59,6 +59,9 @@ public class MockAccumulo {
     return new MockBatchScanner(tables.get(tableName), authorizations);
   }
   
+  /**
+   * @deprecated since 1.4
+   */
   public void addAggregators(String tableName, List<? extends PerColumnIteratorConfig>
aggregators) {
     tables.get(tableName).addAggregators(aggregators);
   }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
Tue Nov 22 16:50:49 2011
@@ -30,6 +30,7 @@ import java.util.TreeSet;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.TableExistsException;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.admin.FindMax;
@@ -83,6 +84,9 @@ public class MockTableOperations extends
     acu.createTable(username, tableName, versioningIter, timeType);
   }
   
+  /**
+   * @deprecated since 1.4 {@link #attachIterator(String, IteratorSetting)}
+   */
   @Override
   public void addAggregators(String tableName, List<? extends PerColumnIteratorConfig>
aggregators) throws AccumuloSecurityException, TableNotFoundException,
       AccumuloException {

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/AggregatingIterator.java
Tue Nov 22 16:50:49 2011
@@ -35,8 +35,8 @@ import org.apache.log4j.Logger;
 /**
  * This iterator wraps another iterator. It automatically aggregates.
  * 
- * 
- * 
+ * @deprecated since 1.4
+ * @use org.apache.accumulo.core.iterators.Combiner
  */
 
 public class AggregatingIterator implements SortedKeyValueIterator<Key,Value>, OptionDescriber
{

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/Aggregator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/Aggregator.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/Aggregator.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/Aggregator.java
Tue Nov 22 16:50:49 2011
@@ -18,6 +18,10 @@ package org.apache.accumulo.core.iterato
 
 import org.apache.accumulo.core.data.Value;
 
+/**
+ * @deprecated since 1.4
+ * @use org.apache.accumulo.core.iterators.Combiner
+ */
 public interface Aggregator {
   void reset();
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/LongSummation.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/LongSummation.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/LongSummation.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/LongSummation.java
Tue Nov 22 16:50:49 2011
@@ -21,6 +21,10 @@ import java.io.IOException;
 import org.apache.accumulo.core.data.Value;
 import org.apache.log4j.Logger;
 
+/**
+ * @deprecated since 1.4
+ * @use org.apache.accumulo.core.iterators.user.SummingCombiner with SummingCombiner.Type.LONG
+ */
 public class LongSummation implements Aggregator {
   private static final Logger log = Logger.getLogger(LongSummation.class);
   long sum = 0;

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumArraySummation.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumArraySummation.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumArraySummation.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumArraySummation.java
Tue Nov 22 16:50:49 2011
@@ -25,6 +25,10 @@ import java.io.IOException;
 import org.apache.accumulo.core.data.Value;
 import org.apache.hadoop.io.WritableUtils;
 
+/**
+ * @deprecated since 1.4
+ * @use org.apache.accumulo.core.iterators.user.SummingArrayCombiner with SummingArrayCombiner.Type.VARNUM
+ */
 public class NumArraySummation implements Aggregator {
   long[] sum = new long[0];
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumSummation.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumSummation.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumSummation.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/NumSummation.java
Tue Nov 22 16:50:49 2011
@@ -25,6 +25,10 @@ import java.io.IOException;
 import org.apache.accumulo.core.data.Value;
 import org.apache.hadoop.io.WritableUtils;
 
+/**
+ * @deprecated since 1.4
+ * @use org.apache.accumulo.core.iterators.user.SummingCombiner with SummingCombiner.Type.VARNUM
+ */
 public class NumSummation implements Aggregator {
   long sum = 0l;
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMax.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMax.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMax.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMax.java
Tue Nov 22 16:50:49 2011
@@ -18,6 +18,10 @@ package org.apache.accumulo.core.iterato
 
 import org.apache.accumulo.core.data.Value;
 
+/**
+ * @deprecated since 1.4
+ * @use org.apache.accumulo.core.iterators.user.MaxCombiner with MaxCombiner.Type.STRING
+ */
 public class StringMax implements Aggregator {
   
   long max = Long.MIN_VALUE;

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMin.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMin.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMin.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringMin.java
Tue Nov 22 16:50:49 2011
@@ -18,6 +18,10 @@ package org.apache.accumulo.core.iterato
 
 import org.apache.accumulo.core.data.Value;
 
+/**
+ * @deprecated since 1.4
+ * @use org.apache.accumulo.core.iterators.user.MinCombiner with MinCombiner.Type.STRING
+ */
 public class StringMin implements Aggregator {
   
   long min = Long.MAX_VALUE;

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringSummation.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringSummation.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringSummation.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/StringSummation.java
Tue Nov 22 16:50:49 2011
@@ -18,6 +18,10 @@ package org.apache.accumulo.core.iterato
 
 import org.apache.accumulo.core.data.Value;
 
+/**
+ * @deprecated since 1.4
+ * @use org.apache.accumulo.core.iterators.user.SummingCombiner with SummingCombiner.Type.STRING
+ */
 public class StringSummation implements Aggregator {
   
   long sum = 0;

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfiguration.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfiguration.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfiguration.java
Tue Nov 22 16:50:49 2011
@@ -20,10 +20,7 @@ import org.apache.accumulo.core.iterator
 import org.apache.hadoop.io.Text;
 
 /**
- * 
  * @deprecated since 1.4
- * @use {@link PerColumnIteratorConfig}
- * 
  */
 public class AggregatorConfiguration extends PerColumnIteratorConfig {
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorSet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorSet.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorSet.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorSet.java
Tue Nov 22 16:50:49 2011
@@ -22,6 +22,9 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.iterators.aggregation.Aggregator;
 import org.apache.accumulo.core.iterators.conf.ColumnToClassMapping;
 
+/**
+ * @deprecated since 1.4
+ */
 public class AggregatorSet extends ColumnToClassMapping<Aggregator> {
   public AggregatorSet(Map<String,String> opts) throws InstantiationException, IllegalAccessException,
ClassNotFoundException {
     super(opts, Aggregator.class);

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java
Tue Nov 22 16:50:49 2011
@@ -23,6 +23,7 @@ import java.util.Map.Entry;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.iterators.conf.ColumnUtil.ColFamHashKey;
 import org.apache.accumulo.core.iterators.conf.ColumnUtil.ColHashKey;
+import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.start.classloader.AccumuloClassLoader;
 import org.apache.hadoop.io.Text;
 
@@ -47,14 +48,14 @@ public class ColumnToClassMapping<K> {
       String column = entry.getKey();
       String className = entry.getValue();
       
-      PerColumnIteratorConfig pcic = PerColumnIteratorConfig.decodeColumns(column, className);
+      Pair<Text,Text> pcic = ColumnSet.decodeColumns(column);
       
       Class<? extends K> clazz = AccumuloClassLoader.loadClass(className, c);
       
-      if (pcic.getColumnQualifier() == null) {
-        addObject(pcic.getColumnFamily(), clazz.newInstance());
+      if (pcic.getSecond() == null) {
+        addObject(pcic.getFirst(), clazz.newInstance());
       } else {
-        addObject(pcic.getColumnFamily(), pcic.getColumnQualifier(), clazz.newInstance());
+        addObject(pcic.getFirst(), pcic.getSecond(), clazz.newInstance());
       }
     }
   }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/VersioningIterator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/VersioningIterator.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/VersioningIterator.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/iterators/user/VersioningIterator.java
Tue Nov 22 16:50:49 2011
@@ -32,7 +32,6 @@ import org.apache.accumulo.core.iterator
 import org.apache.accumulo.core.iterators.OptionDescriber;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iterators.WrappingIterator;
-import org.apache.accumulo.core.iterators.OptionDescriber.IteratorOptions;
 
 public class VersioningIterator extends WrappingIterator implements OptionDescriber {
   

Modified: incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/admin/TableOperationsHelperTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/admin/TableOperationsHelperTest.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/admin/TableOperationsHelperTest.java
(original)
+++ incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/client/admin/TableOperationsHelperTest.java
Tue Nov 22 16:50:49 2011
@@ -32,8 +32,6 @@ import org.apache.accumulo.core.client.A
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.TableExistsException;
 import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.client.admin.TableOperationsHelper;
-import org.apache.accumulo.core.client.admin.TimeType;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
 import org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig;
@@ -188,6 +186,9 @@ public class TableOperationsHelperTest {
       Assert.assertEquals(expected, settings.get(tablename));
     }
     
+    /**
+     * @deprecated since 1.4 {@link #attachIterator(String, IteratorSetting)}
+     */
     @Override
     public void addAggregators(String tableName, List<? extends PerColumnIteratorConfig>
aggregators) throws AccumuloSecurityException, TableNotFoundException,
         AccumuloException {}

Modified: incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/AggregatingIteratorTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/AggregatingIteratorTest.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/AggregatingIteratorTest.java
(original)
+++ incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/AggregatingIteratorTest.java
Tue Nov 22 16:50:49 2011
@@ -31,13 +31,13 @@ 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.AggregatingIterator;
-import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
-import org.apache.accumulo.core.iterators.SortedMapIterator;
 import org.apache.accumulo.core.iterators.aggregation.Aggregator;
 import org.apache.accumulo.core.iterators.system.MultiIterator;
 import org.apache.hadoop.io.Text;
 
+/**
+ * @deprecated since 1.4
+ */
 public class AggregatingIteratorTest extends TestCase {
   
   private static final Collection<ByteSequence> EMPTY_COL_FAMS = new ArrayList<ByteSequence>();

Modified: incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/VersioningIteratorTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/VersioningIteratorTest.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/VersioningIteratorTest.java
(original)
+++ incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/VersioningIteratorTest.java
Tue Nov 22 16:50:49 2011
@@ -19,8 +19,8 @@ package org.apache.accumulo.core.iterato
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.TreeMap;
 import java.util.Map.Entry;
+import java.util.TreeMap;
 
 import junit.framework.TestCase;
 
@@ -28,20 +28,20 @@ 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.SortedMapIterator;
-import org.apache.accumulo.core.iterators.aggregation.LongSummation;
+import org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder;
 import org.apache.accumulo.core.iterators.user.VersioningIterator;
 import org.apache.hadoop.io.Text;
 
 public class VersioningIteratorTest extends TestCase {
   // add test for seek function
   private static final Collection<ByteSequence> EMPTY_COL_FAMS = new ArrayList<ByteSequence>();
+  private static final Encoder<Long> encoder = new LongCombiner.LongEncoder();
   
   void createTestData(TreeMap<Key,Value> tm, Text colf, Text colq) {
     for (int i = 0; i < 2; i++) {
       for (long j = 0; j < 20; j++) {
         Key k = new Key(new Text(String.format("%03d", i)), colf, colq, j);
-        tm.put(k, new Value(LongSummation.longToBytes(j)));
+        tm.put(k, new Value(encoder.encode(j)));
       }
     }
     
@@ -74,7 +74,7 @@ public class VersioningIteratorTest exte
       
       for (Entry<Key,Value> e : tmOut.entrySet()) {
         assertTrue(e.getValue().get().length == 8);
-        assertTrue(16 < LongSummation.bytesToLong(e.getValue().get()));
+        assertTrue(16 < encoder.decode(e.getValue().get()));
       }
       assertTrue("size after keeping 3 versions was " + tmOut.size(), tmOut.size() == 6);
     } catch (IOException e) {
@@ -106,7 +106,7 @@ public class VersioningIteratorTest exte
       
       for (Entry<Key,Value> e : tmOut.entrySet()) {
         assertTrue(e.getValue().get().length == 8);
-        assertTrue(16 < LongSummation.bytesToLong(e.getValue().get()));
+        assertTrue(16 < encoder.decode(e.getValue().get()));
       }
       assertTrue("size after keeping 2 versions was " + tmOut.size(), tmOut.size() == 2);
     } catch (IOException e) {
@@ -136,7 +136,7 @@ public class VersioningIteratorTest exte
       
       for (Entry<Key,Value> e : tmOut.entrySet()) {
         assertTrue(e.getValue().get().length == 8);
-        assertTrue(16 < LongSummation.bytesToLong(e.getValue().get()));
+        assertTrue(16 < encoder.decode(e.getValue().get()));
       }
       
       assertTrue("size after seeking past versions was " + tmOut.size(), tmOut.size() ==
0);
@@ -149,7 +149,7 @@ public class VersioningIteratorTest exte
       
       for (Entry<Key,Value> e : tmOut.entrySet()) {
         assertTrue(e.getValue().get().length == 8);
-        assertTrue(16 < LongSummation.bytesToLong(e.getValue().get()));
+        assertTrue(16 < encoder.decode(e.getValue().get()));
       }
       
       assertTrue("size after seeking past versions was " + tmOut.size(), tmOut.size() ==
3);

Modified: incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/NumSummationTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/NumSummationTest.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/NumSummationTest.java
(original)
+++ incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/NumSummationTest.java
Tue Nov 22 16:50:49 2011
@@ -16,12 +16,13 @@
  */
 package org.apache.accumulo.core.iterators.aggregation;
 
-import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.iterators.aggregation.NumArraySummation;
-import org.apache.accumulo.core.iterators.aggregation.NumSummation;
-
 import junit.framework.TestCase;
 
+import org.apache.accumulo.core.data.Value;
+
+/**
+ * @deprecated since 1.4
+ */
 public class NumSummationTest extends TestCase {
   public byte[] init(int n) {
     byte[] b = new byte[n];

Modified: incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfigurationTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfigurationTest.java?rev=1205076&r1=1205075&r2=1205076&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfigurationTest.java
(original)
+++ incubator/accumulo/trunk/src/core/src/test/java/org/apache/accumulo/core/iterators/aggregation/conf/AggregatorConfigurationTest.java
Tue Nov 22 16:50:49 2011
@@ -21,6 +21,9 @@ import junit.framework.TestCase;
 import org.apache.accumulo.core.iterators.conf.PerColumnIteratorConfig;
 import org.apache.hadoop.io.Text;
 
+/**
+ * @deprecated since 1.4
+ */
 public class AggregatorConfigurationTest extends TestCase {
   public void testBinary() {
     Text colf = new Text();



Mime
View raw message