accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [accumulo] branch 2.0 updated: Lexicoder API improvements (#1285)
Date Tue, 23 Jul 2019 18:58:56 GMT
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch 2.0
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.0 by this push:
     new 575e347  Lexicoder API improvements (#1285)
575e347 is described below

commit 575e347d44a0f4b814b5e105663d1a2d48ea1d3e
Author: Christopher Tubbs <ctubbsii@apache.org>
AuthorDate: Tue Jul 23 14:58:51 2019 -0400

    Lexicoder API improvements (#1285)
    
    * Remove public API use of internal ValueFormatException and
      TypedValueCombiner.Encoder interface
    * Remove exception in Apilyzer configuration for ValueFormatException in
      Lexicoder public APIs
    * Remove redundant and no-longer needed TypedValueCombiner.Encoder
      interface
    * Update comments in the Lexicoders to indicate the reason for
      preserving override methods for the purpose of binary compatibility
---
 core/pom.xml                                              |  2 --
 .../accumulo/core/client/lexicoder/AbstractEncoder.java   | 11 +++++------
 .../core/client/lexicoder/BigIntegerLexicoder.java        |  8 +++-----
 .../accumulo/core/client/lexicoder/DateLexicoder.java     |  4 ++--
 .../accumulo/core/client/lexicoder/DoubleLexicoder.java   |  4 ++--
 .../apache/accumulo/core/client/lexicoder/Encoder.java    |  5 +++--
 .../accumulo/core/client/lexicoder/FloatLexicoder.java    |  7 +++----
 .../accumulo/core/client/lexicoder/IntegerLexicoder.java  |  4 ++--
 .../accumulo/core/client/lexicoder/ListLexicoder.java     |  4 ++--
 .../accumulo/core/client/lexicoder/PairLexicoder.java     |  4 ++--
 .../accumulo/core/client/lexicoder/StringLexicoder.java   |  4 ++--
 .../accumulo/core/client/lexicoder/TextLexicoder.java     |  4 ++--
 .../accumulo/core/client/lexicoder/UIntegerLexicoder.java |  4 ++--
 .../accumulo/core/client/lexicoder/ULongLexicoder.java    |  4 ++--
 .../accumulo/core/client/lexicoder/UUIDLexicoder.java     |  7 +++----
 .../org/apache/accumulo/core/iterators/LongCombiner.java  | 15 ++++++++-------
 .../accumulo/core/iterators/TypedValueCombiner.java       | 11 +----------
 .../accumulo/core/iterators/user/BigDecimalCombiner.java  |  4 ++--
 .../core/iterators/user/SummingArrayCombiner.java         | 11 ++++++-----
 .../core/iterators/user/BigDecimalCombinerTest.java       |  2 +-
 .../apache/accumulo/core/iterators/user/CombinerTest.java |  2 +-
 .../core/iterators/user/VersioningIteratorTest.java       |  2 +-
 22 files changed, 55 insertions(+), 68 deletions(-)

diff --git a/core/pom.xml b/core/pom.xml
index 748f078..cd100a8 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -205,8 +205,6 @@
                 <allow>javax[.]security[.]auth[.]DestroyFailedException</allow>
                 <!-- allow questionable Hadoop exceptions for mapreduce -->
                 <allow>org[.]apache[.]hadoop[.]mapred[.](FileAlreadyExistsException|InvalidJobConfException)</allow>
-                <!-- allow lexicoders to throw iterator exceptions -->
-                <allow>org[.]apache[.]accumulo[.]core[.]iterators[.]ValueFormatException</allow>
               </allows>
             </configuration>
           </execution>
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
index 47eee4a..0b0831d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
@@ -19,12 +19,10 @@ package org.apache.accumulo.core.client.lexicoder;
 import static com.google.common.base.Preconditions.checkArgument;
 import static java.util.Objects.requireNonNull;
 
-import org.apache.accumulo.core.iterators.ValueFormatException;
-
 /**
- * AbstractEncoder is an {@link org.apache.accumulo.core.client.lexicoder.Encoder} that implements
- * all of Encoder's methods validating the input, but has those methods defer logic to to
a new
- * method, {@link #decodeUnchecked(byte[], int, int)}.
+ * AbstractEncoder is an {@link Encoder} that implements all of Encoder's methods validating
the
+ * input, but has those methods defer logic to to a new method,
+ * {@link #decodeUnchecked(byte[], int, int)}.
  *
  * @since 1.7.0
  */
@@ -34,7 +32,8 @@ public abstract class AbstractEncoder<T> implements Encoder<T>
{
    * Decodes a byte array without checking if the offset and len exceed the bounds of the
actual
    * array.
    */
-  protected abstract T decodeUnchecked(byte[] b, int offset, int len) throws ValueFormatException;
+  protected abstract T decodeUnchecked(byte[] b, int offset, int len)
+      throws IllegalArgumentException;
 
   @Override
   public T decode(byte[] b) {
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/BigIntegerLexicoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/BigIntegerLexicoder.java
index ee49d05..245cda1 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/BigIntegerLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/BigIntegerLexicoder.java
@@ -24,7 +24,6 @@ import java.math.BigInteger;
 
 import org.apache.accumulo.core.clientImpl.lexicoder.AbstractLexicoder;
 import org.apache.accumulo.core.clientImpl.lexicoder.FixedByteArrayOutputStream;
-import org.apache.accumulo.core.iterators.ValueFormatException;
 
 /**
  * A lexicoder to encode/decode a BigInteger to/from bytes that maintain its native Java
sort order.
@@ -65,14 +64,13 @@ public class BigIntegerLexicoder extends AbstractLexicoder<BigInteger>
{
 
   @Override
   public BigInteger decode(byte[] b) {
-    // This concrete implementation is provided for binary compatibility with 1.6; it can
be removed
-    // in 2.0. See ACCUMULO-3789.
+    // This concrete implementation is provided for binary compatibility, since the corresponding
+    // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
     return super.decode(b);
   }
 
   @Override
-  protected BigInteger decodeUnchecked(byte[] b, int offset, int origLen)
-      throws ValueFormatException {
+  protected BigInteger decodeUnchecked(byte[] b, int offset, int origLen) {
 
     try {
       DataInputStream dis = new DataInputStream(new ByteArrayInputStream(b, offset, origLen));
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java
index b39ae68..452c4ae 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java
@@ -36,8 +36,8 @@ public class DateLexicoder extends AbstractLexicoder<Date> {
 
   @Override
   public Date decode(byte[] b) {
-    // This concrete implementation is provided for binary compatibility with 1.6; it can
be removed
-    // in 2.0. See ACCUMULO-3789.
+    // This concrete implementation is provided for binary compatibility, since the corresponding
+    // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
     return super.decode(b);
   }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DoubleLexicoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DoubleLexicoder.java
index 81488fb..dbbba7c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DoubleLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DoubleLexicoder.java
@@ -40,8 +40,8 @@ public class DoubleLexicoder extends AbstractLexicoder<Double> {
 
   @Override
   public Double decode(byte[] b) {
-    // This concrete implementation is provided for binary compatibility with 1.6; it can
be removed
-    // in 2.0. See ACCUMULO-3789.
+    // This concrete implementation is provided for binary compatibility, since the corresponding
+    // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
     return super.decode(b);
   }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/Encoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/Encoder.java
index 512f45b..f4bf3bb 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/Encoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/Encoder.java
@@ -21,7 +21,8 @@ package org.apache.accumulo.core.client.lexicoder;
  *
  * @since 1.6.0
  */
-public interface Encoder<T>
-    extends org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder<T> {
+public interface Encoder<T> {
+  byte[] encode(T object);
 
+  T decode(byte[] bytes) throws IllegalArgumentException;
 }
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/FloatLexicoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/FloatLexicoder.java
index dd788ea..ad03533 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/FloatLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/FloatLexicoder.java
@@ -17,7 +17,6 @@
 package org.apache.accumulo.core.client.lexicoder;
 
 import org.apache.accumulo.core.clientImpl.lexicoder.AbstractLexicoder;
-import org.apache.accumulo.core.iterators.ValueFormatException;
 
 /**
  * A lexicoder for preserving the native Java sort order of Float values.
@@ -42,13 +41,13 @@ public class FloatLexicoder extends AbstractLexicoder<Float> {
 
   @Override
   public Float decode(byte[] b) {
-    // This concrete implementation is provided for binary compatibility with 1.6; it can
be removed
-    // in 2.0. See ACCUMULO-3789.
+    // This concrete implementation is provided for binary compatibility, since the corresponding
+    // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
     return super.decode(b);
   }
 
   @Override
-  protected Float decodeUnchecked(byte[] b, int offset, int len) throws ValueFormatException
{
+  protected Float decodeUnchecked(byte[] b, int offset, int len) {
     int i = intEncoder.decodeUnchecked(b, offset, len);
     if (i < 0) {
       i = i ^ 0x80000000;
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/IntegerLexicoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/IntegerLexicoder.java
index 50affd9..0b2fa33 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/IntegerLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/IntegerLexicoder.java
@@ -35,8 +35,8 @@ public class IntegerLexicoder extends AbstractLexicoder<Integer> {
 
   @Override
   public Integer decode(byte[] b) {
-    // This concrete implementation is provided for binary compatibility with 1.6; it can
be removed
-    // in 2.0. See ACCUMULO-3789.
+    // This concrete implementation is provided for binary compatibility, since the corresponding
+    // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
     return super.decode(b);
   }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ListLexicoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ListLexicoder.java
index a2fd35f..5835290 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ListLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ListLexicoder.java
@@ -65,8 +65,8 @@ public class ListLexicoder<LT> extends AbstractLexicoder<List<LT>>
{
 
   @Override
   public List<LT> decode(byte[] b) {
-    // This concrete implementation is provided for binary compatibility with 1.6; it can
be removed
-    // in 2.0. See ACCUMULO-3789.
+    // This concrete implementation is provided for binary compatibility, since the corresponding
+    // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
     return super.decode(b);
   }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/PairLexicoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/PairLexicoder.java
index 8af1038..c887171 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/PairLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/PairLexicoder.java
@@ -69,8 +69,8 @@ public class PairLexicoder<A extends Comparable<A>,B extends Comparable<B>>
 
   @Override
   public ComparablePair<A,B> decode(byte[] b) {
-    // This concrete implementation is provided for binary compatibility with 1.6; it can
be removed
-    // in 2.0. See ACCUMULO-3789.
+    // This concrete implementation is provided for binary compatibility, since the corresponding
+    // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
     return super.decode(b);
   }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/StringLexicoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/StringLexicoder.java
index c306af7..31b6117 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/StringLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/StringLexicoder.java
@@ -35,8 +35,8 @@ public class StringLexicoder extends AbstractLexicoder<String> {
 
   @Override
   public String decode(byte[] b) {
-    // This concrete implementation is provided for binary compatibility with 1.6; it can
be removed
-    // in 2.0. See ACCUMULO-3789.
+    // This concrete implementation is provided for binary compatibility, since the corresponding
+    // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
     return super.decode(b);
   }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/TextLexicoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/TextLexicoder.java
index 2cf2d4c..560cc46 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/TextLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/TextLexicoder.java
@@ -35,8 +35,8 @@ public class TextLexicoder extends AbstractLexicoder<Text> {
 
   @Override
   public Text decode(byte[] b) {
-    // This concrete implementation is provided for binary compatibility with 1.6; it can
be removed
-    // in 2.0. See ACCUMULO-3789.
+    // This concrete implementation is provided for binary compatibility, since the corresponding
+    // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
     return super.decode(b);
   }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UIntegerLexicoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UIntegerLexicoder.java
index 9a4b895..8589602 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UIntegerLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UIntegerLexicoder.java
@@ -56,8 +56,8 @@ public class UIntegerLexicoder extends AbstractLexicoder<Integer>
{
 
   @Override
   public Integer decode(byte[] b) {
-    // This concrete implementation is provided for binary compatibility with 1.6; it can
be removed
-    // in 2.0. See ACCUMULO-3789.
+    // This concrete implementation is provided for binary compatibility, since the corresponding
+    // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
     return super.decode(b);
   }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoder.java
index c852c6c..d5a0ee9 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoder.java
@@ -77,8 +77,8 @@ public class ULongLexicoder extends AbstractLexicoder<Long> {
 
   @Override
   public Long decode(byte[] b) {
-    // This concrete implementation is provided for binary compatibility with 1.6; it can
be removed
-    // in 2.0. See ACCUMULO-3789.
+    // This concrete implementation is provided for binary compatibility, since the corresponding
+    // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
     return super.decode(b);
   }
 }
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java
b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java
index d57b346..aa1ba61 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoder.java
@@ -24,7 +24,6 @@ import java.util.UUID;
 
 import org.apache.accumulo.core.clientImpl.lexicoder.AbstractLexicoder;
 import org.apache.accumulo.core.clientImpl.lexicoder.FixedByteArrayOutputStream;
-import org.apache.accumulo.core.iterators.ValueFormatException;
 
 /**
  * A lexicoder for a UUID that maintains its lexicographic sorting order.
@@ -58,13 +57,13 @@ public class UUIDLexicoder extends AbstractLexicoder<UUID> {
 
   @Override
   public UUID decode(byte[] b) {
-    // This concrete implementation is provided for binary compatibility with 1.6; it can
be removed
-    // in 2.0. See ACCUMULO-3789.
+    // This concrete implementation is provided for binary compatibility, since the corresponding
+    // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
     return super.decode(b);
   }
 
   @Override
-  protected UUID decodeUnchecked(byte[] b, int offset, int len) throws ValueFormatException
{
+  protected UUID decodeUnchecked(byte[] b, int offset, int len) {
     try {
       DataInputStream in = new DataInputStream(new ByteArrayInputStream(b, offset, len));
       return new UUID(in.readLong() ^ 0x8000000000000000L, in.readLong() ^ 0x8000000000000000L);
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/LongCombiner.java b/core/src/main/java/org/apache/accumulo/core/iterators/LongCombiner.java
index 8a8a33c..888eb1f 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/LongCombiner.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/LongCombiner.java
@@ -26,6 +26,7 @@ import java.io.IOException;
 import java.util.Map;
 
 import org.apache.accumulo.core.client.IteratorSetting;
+import org.apache.accumulo.core.client.lexicoder.Encoder;
 import org.apache.accumulo.core.clientImpl.lexicoder.AbstractLexicoder;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
@@ -53,7 +54,7 @@ public abstract class LongCombiner extends TypedValueCombiner<Long>
{
   protected static final String TYPE = "type";
   protected static final String CLASS_PREFIX = "class:";
 
-  public static enum Type {
+  public enum Type {
     /**
      * indicates a variable-length encoding of a Long using {@link LongCombiner.VarLenEncoder}
      */
@@ -143,8 +144,8 @@ public abstract class LongCombiner extends TypedValueCombiner<Long>
{
 
     @Override
     public Long decode(byte[] b) {
-      // This concrete implementation is provided for binary compatibility with 1.6; it can
be
-      // removed in 2.0. See ACCUMULO-3789.
+      // This concrete implementation is provided for binary compatibility, since the corresponding
+      // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
       return super.decode(b);
     }
 
@@ -179,8 +180,8 @@ public abstract class LongCombiner extends TypedValueCombiner<Long>
{
 
     @Override
     public Long decode(byte[] b) {
-      // This concrete implementation is provided for binary compatibility with 1.6; it can
be
-      // removed in 2.0. See ACCUMULO-3789.
+      // This concrete implementation is provided for binary compatibility, since the corresponding
+      // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
       return super.decode(b);
     }
 
@@ -225,8 +226,8 @@ public abstract class LongCombiner extends TypedValueCombiner<Long>
{
 
     @Override
     public Long decode(byte[] b) {
-      // This concrete implementation is provided for binary compatibility with 1.6; it can
be
-      // removed in 2.0. See ACCUMULO-3789.
+      // This concrete implementation is provided for binary compatibility, since the corresponding
+      // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
       return super.decode(b);
     }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java
b/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java
index 6d0df5a..0610ed0 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java
@@ -22,6 +22,7 @@ import java.util.Map;
 import java.util.NoSuchElementException;
 
 import org.apache.accumulo.core.client.IteratorSetting;
+import org.apache.accumulo.core.client.lexicoder.Encoder;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
@@ -110,16 +111,6 @@ public abstract class TypedValueCombiner<V> extends Combiner {
   }
 
   /**
-   * An interface for translating from byte[] to V and back. Decodes the entire contents
of the byte
-   * array.
-   */
-  public interface Encoder<V> {
-    byte[] encode(V v);
-
-    V decode(byte[] b) throws ValueFormatException;
-  }
-
-  /**
    * Sets the {@code Encoder<V>} used to translate Values to V and back.
    */
   protected void setEncoder(Encoder<V> encoder) {
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/BigDecimalCombiner.java
b/core/src/main/java/org/apache/accumulo/core/iterators/user/BigDecimalCombiner.java
index 99a9df4..2f85675 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/BigDecimalCombiner.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/BigDecimalCombiner.java
@@ -109,8 +109,8 @@ public abstract class BigDecimalCombiner extends TypedValueCombiner<BigDecimal>
 
     @Override
     public BigDecimal decode(byte[] b) {
-      // This concrete implementation is provided for binary compatibility with 1.6; it can
be
-      // removed in 2.0. See ACCUMULO-3789.
+      // This concrete implementation is provided for binary compatibility, since the corresponding
+      // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
       return super.decode(b);
     }
 
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java
b/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java
index 8a256b9..015a12f 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/SummingArrayCombiner.java
@@ -31,6 +31,7 @@ import java.util.Map;
 
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.lexicoder.AbstractEncoder;
+import org.apache.accumulo.core.client.lexicoder.Encoder;
 import org.apache.accumulo.core.clientImpl.lexicoder.AbstractLexicoder;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
@@ -52,7 +53,7 @@ public class SummingArrayCombiner extends TypedValueCombiner<List<Long>>
{
   private static final String TYPE = "type";
   private static final String CLASS_PREFIX = "class:";
 
-  public static enum Type {
+  public enum Type {
     /**
      * indicates a variable-length encoding of a list of Longs using
      * {@link SummingArrayCombiner.VarLongArrayEncoder}
@@ -169,8 +170,8 @@ public class SummingArrayCombiner extends TypedValueCombiner<List<Long>>
{
 
     @Override
     public List<V> decode(byte[] b) {
-      // This concrete implementation is provided for binary compatibility with 1.6; it can
be
-      // removed in 2.0. See ACCUMULO-3789.
+      // This concrete implementation is provided for binary compatibility, since the corresponding
+      // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
       return super.decode(b);
     }
 
@@ -229,8 +230,8 @@ public class SummingArrayCombiner extends TypedValueCombiner<List<Long>>
{
 
     @Override
     public List<Long> decode(byte[] b) {
-      // This concrete implementation is provided for binary compatibility with 1.6; it can
be
-      // removed in 2.0. See ACCUMULO-3789.
+      // This concrete implementation is provided for binary compatibility, since the corresponding
+      // superclass method has type-erased return type Object. See ACCUMULO-3789 and #1285.
       return super.decode(b);
     }
 
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/BigDecimalCombinerTest.java
b/core/src/test/java/org/apache/accumulo/core/iterators/user/BigDecimalCombinerTest.java
index de51a85..1085da4 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/BigDecimalCombinerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/BigDecimalCombinerTest.java
@@ -30,13 +30,13 @@ import java.util.TreeMap;
 
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.IteratorSetting.Column;
+import org.apache.accumulo.core.client.lexicoder.Encoder;
 import org.apache.accumulo.core.data.ByteSequence;
 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.SortedMapIterator;
-import org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder;
 import org.junit.Before;
 import org.junit.Test;
 
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
b/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
index 0d83bf0..7fc6bee 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/CombinerTest.java
@@ -31,6 +31,7 @@ import java.util.List;
 import java.util.TreeMap;
 
 import org.apache.accumulo.core.client.IteratorSetting;
+import org.apache.accumulo.core.client.lexicoder.Encoder;
 import org.apache.accumulo.core.data.ByteSequence;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Range;
@@ -48,7 +49,6 @@ import org.apache.accumulo.core.iterators.LongCombiner.VarLenEncoder;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iterators.SortedMapIterator;
 import org.apache.accumulo.core.iterators.TypedValueCombiner;
-import org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder;
 import org.apache.accumulo.core.iterators.ValueFormatException;
 import org.apache.accumulo.core.iterators.system.MultiIterator;
 import org.apache.hadoop.io.Text;
diff --git a/core/src/test/java/org/apache/accumulo/core/iterators/user/VersioningIteratorTest.java
b/core/src/test/java/org/apache/accumulo/core/iterators/user/VersioningIteratorTest.java
index 4836c82..b52230c 100644
--- a/core/src/test/java/org/apache/accumulo/core/iterators/user/VersioningIteratorTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/iterators/user/VersioningIteratorTest.java
@@ -28,6 +28,7 @@ import java.util.Map.Entry;
 import java.util.TreeMap;
 
 import org.apache.accumulo.core.client.IteratorSetting;
+import org.apache.accumulo.core.client.lexicoder.Encoder;
 import org.apache.accumulo.core.data.ByteSequence;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.PartialKey;
@@ -35,7 +36,6 @@ import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.LongCombiner;
 import org.apache.accumulo.core.iterators.SortedMapIterator;
-import org.apache.accumulo.core.iterators.TypedValueCombiner.Encoder;
 import org.apache.hadoop.io.Text;
 import org.junit.Test;
 import org.slf4j.Logger;


Mime
View raw message