incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1234951 - /incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java
Date Mon, 23 Jan 2012 19:51:53 GMT
Author: vines
Date: Mon Jan 23 19:51:53 2012
New Revision: 1234951

URL: http://svn.apache.org/viewvc?rev=1234951&view=rev
Log:
ACCUMULO-319 - convenience method added


Modified:
    incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java

Modified: incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java?rev=1234951&r1=1234950&r2=1234951&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java
(original)
+++ incubator/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/iterators/TypedValueCombiner.java
Mon Jan 23 19:51:53 2012
@@ -21,6 +21,7 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.NoSuchElementException;
 
+import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.start.classloader.AccumuloClassLoader;
@@ -215,6 +216,19 @@ public abstract class TypedValueCombiner
   }
 
   /**
+   * A convenience method to set the "lossy" option on a TypedValueCombiner. If true, the
combiner will ignore any values which fail to decode. Otherwise, the
+   * combiner will throw an error which will interrupt the action (and prevent potential
data loss). False is the default behavior.
+   * 
+   * @param is
+   *          iterator settings object to configure
+   * @param lossy
+   *          if true the combiner will ignored values which fail to decode; otherwise error.
+   */
+  public static void setLossyness(IteratorSetting is, boolean lossy) {
+    is.addOption(LOSSY, Boolean.toString(lossy));
+  }
+  
+  /**
    * Reduces a list of V into a single V.
    * 
    * @param key



Mime
View raw message