fluo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject incubator-fluo-recipes git commit: Reviewed APIs in prep for 1.0 release. Made two small changes.
Date Wed, 05 Oct 2016 15:18:04 GMT
Repository: incubator-fluo-recipes
Updated Branches:
  refs/heads/master dc765718c -> f4e971389


Reviewed APIs in prep for 1.0 release.  Made two small changes.

 * Made it easier to do table optimizations for any recipe
 * Made type layer increment return old value
 * Optimized some code


Project: http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/commit/f4e97138
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/tree/f4e97138
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/diff/f4e97138

Branch: refs/heads/master
Commit: f4e97138935f6adf289e6cb1b46910d0bca556e3
Parents: dc76571
Author: Keith Turner <kturner@apache.org>
Authored: Tue Oct 4 16:01:32 2016 -0400
Committer: Keith Turner <kturner@apache.org>
Committed: Wed Oct 5 11:16:09 2016 -0400

----------------------------------------------------------------------
 docs/row-hasher.md                              | 20 +++-
 docs/table-optimization.md                      | 23 +++--
 .../recipes/accumulo/cmds/OptimizeTable.java    |  4 +-
 .../recipes/accumulo/ops/TableOperations.java   | 16 +++-
 .../recipes/core/common/TableOptimizations.java | 42 ++++++++-
 .../fluo/recipes/core/data/RowHasher.java       | 96 ++++++++++++++-----
 .../fluo/recipes/core/export/ExportQueue.java   | 74 +++++++--------
 .../fluo/recipes/core/impl/BucketUtil.java      | 13 ++-
 .../fluo/recipes/core/map/CollisionFreeMap.java | 98 +++++++++-----------
 .../core/types/TypedTransactionBase.java        | 10 +-
 .../fluo/recipes/core/common/TestGrouping.java  | 10 +-
 .../fluo/recipes/core/data/RowHasherTest.java   | 13 ++-
 .../fluo/recipes/core/map/SplitsTest.java       | 15 +--
 .../fluo/recipes/core/types/TypeLayerTest.java  | 54 ++++++-----
 .../fluo/recipes/test/AccumuloExportITBase.java |  4 +-
 15 files changed, 297 insertions(+), 195 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/docs/row-hasher.md
----------------------------------------------------------------------
diff --git a/docs/row-hasher.md b/docs/row-hasher.md
index fdd8218..1f5158d 100644
--- a/docs/row-hasher.md
+++ b/docs/row-hasher.md
@@ -30,16 +30,17 @@ balancing of the prefix.
 ## Example Use
 
 ```java
+import org.apache.fluo.api.config.FluoConfiguration;
 import org.apache.fluo.api.data.Bytes;
-import org.apache.fluo.recipes.core.common.TableOptimizations;
 import org.apache.fluo.recipes.core.data.RowHasher;
 
 public class RowHasherExample {
 
+
   private static final RowHasher PAGE_ROW_HASHER = new RowHasher("p");
 
-  //Provide one place to obtain row hasher.  
-  public static RowHasher getPageRowHasher(){
+  // Provide one place to obtain row hasher.
+  public static RowHasher getPageRowHasher() {
     return PAGE_ROW_HASHER;
   }
 
@@ -60,14 +61,23 @@ public class RowHasherExample {
     // Generate table optimizations for the recipe. This can be called when setting up an
     // application that uses a hashed row.
     int numTablets = 20;
-    TableOptimizations tableOptimizations = pageRowHasher.getTableOptimizations(numTablets);
+
+    // The following code would normally be called before initializing Fluo. This code
+    // registers table optimizations for your prefix+hash.
+    FluoConfiguration conf = new FluoConfiguration();
+    RowHasher.configure(conf, PAGE_ROW_HASHER.getPrefix(), numTablets);
+
+    // Normally you would not call the following code, it would be called automatically for
you by
+    // TableOperations.optimizeTable(). Calling this code here to show what table optimization
will
+    // be generated.
+    TableOptimizations tableOptimizations = new RowHasher.Optimizer()
+        .getTableOptimizations(PAGE_ROW_HASHER.getPrefix(), conf.getAppConfiguration());
     System.out.println("Balance config : " + tableOptimizations.getTabletGroupingRegex());
     System.out.println("Splits         : ");
     tableOptimizations.getSplits().forEach(System.out::println);
     System.out.println();
   }
 }
-
 ```
 
 The example program above prints the following.

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/docs/table-optimization.md
----------------------------------------------------------------------
diff --git a/docs/table-optimization.md b/docs/table-optimization.md
index 068f586..7235981 100644
--- a/docs/table-optimization.md
+++ b/docs/table-optimization.md
@@ -20,21 +20,17 @@ ExportQueue.configure(fluoConf, ...);
 //CollisionFreeMap.configure() will return table optimizations it would like made
 CollisionFreeMap.configure(fluoConf, ...);
 
+//configure optimizations for a prefixed hash range of a table
+RowHasher.configure(fluoConf, ...);
+
 //initialize Fluo
 FluoFactory.newAdmin(fluoConf).initialize(...)
 
 //Automatically optimize the Fluo table for all configured recipes
-TableOptimizations tableOptimizations = getConfiguredOptimizations(fluoConf);
-TableOperations.optimizeTable(fluoConf, tableOptimizations);
+TableOperations.optimizeTable(fluoConf);
 ```
 
-The above example automatically optimizes all configured recipes.  If more
-selective optimizations is need look into using the following methods instead.
-
- * `CollisionFreeMap.getTableOptimizations(String mapId, Configuration appConfig)`
- * `ExportQueue.getTableOptimizations(String queueId, Configuration appConfig)`
- * `TableOperations.optimizeTable(FluoConfiguration fluoConfig, TableOptimizations tableOptim)`
- * `TableOptimizations.merge()`
+[TableOperations][2] is provided in the Accumulo module of Fluo Recipes.
 
 ## Command Example
 
@@ -54,5 +50,12 @@ fluo init app1
 
 #optimize table for all configured recipes
 fluo exec app1 org.apache.fluo.recipes.accumulo.cmds.OptimizeTable
-
 ```
+
+## Table optimization registry
+
+Recipes register themself by calling [TableOptimizations.registerOptimization()][1].  Anyone
can use
+this mechanism, its not limited to use by exisitng recipes.
+
+[1]: ../modules/core/src/main/java/org/apache/fluo/recipes/core/common/TableOptimizations.java
+[2]: ../modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/ops/TableOperations.java

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/cmds/OptimizeTable.java
----------------------------------------------------------------------
diff --git a/modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/cmds/OptimizeTable.java
b/modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/cmds/OptimizeTable.java
index 92651bd..a3ca8c6 100644
--- a/modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/cmds/OptimizeTable.java
+++ b/modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/cmds/OptimizeTable.java
@@ -19,7 +19,6 @@ import javax.inject.Inject;
 
 import org.apache.fluo.api.config.FluoConfiguration;
 import org.apache.fluo.recipes.accumulo.ops.TableOperations;
-import org.apache.fluo.recipes.core.common.TableOptimizations;
 
 /**
  * @since 1.0.0
@@ -36,8 +35,7 @@ public class OptimizeTable {
       System.exit(-1);
     }
 
-    TableOperations.optimizeTable(fluoConfig,
-        TableOptimizations.getConfiguredOptimizations(fluoConfig));
+    TableOperations.optimizeTable(fluoConfig);
     System.out.println("Finished optimizing table");
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/ops/TableOperations.java
----------------------------------------------------------------------
diff --git a/modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/ops/TableOperations.java
b/modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/ops/TableOperations.java
index e433317..c8d5348 100644
--- a/modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/ops/TableOperations.java
+++ b/modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/ops/TableOperations.java
@@ -63,11 +63,13 @@ public class TableOperations {
   }
 
   /**
-   * This method will perform all post initialization recommended actions.
+   * Make the requested table optimizations.
+   * 
+   * @param fluoConfig should contain information need to connect to Accumulo and name of
Fluo table
+   * @param tableOptim Will perform these optimizations on Fluo table in Accumulo.
    */
   public static void optimizeTable(FluoConfiguration fluoConfig, TableOptimizations tableOptim)
       throws Exception {
-
     Connector conn = getConnector(fluoConfig);
 
     TreeSet<Text> splits = new TreeSet<>();
@@ -102,6 +104,16 @@ public class TableOperations {
   }
 
   /**
+   * This method will perform all registered table optimizations. It will call
+   * {@link TableOptimizations#getConfiguredOptimizations(FluoConfiguration)} to obtain
+   * optimizations to perform.
+   */
+  public static void optimizeTable(FluoConfiguration fluoConfig) throws Exception {
+    TableOptimizations tableOptim = TableOptimizations.getConfiguredOptimizations(fluoConfig);
+    optimizeTable(fluoConfig, tableOptim);
+  }
+
+  /**
    * Compact all transient regions that were registered using {@link TransientRegistry}
    */
   public static void compactTransient(FluoConfiguration fluoConfig) throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/core/src/main/java/org/apache/fluo/recipes/core/common/TableOptimizations.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/recipes/core/common/TableOptimizations.java
b/modules/core/src/main/java/org/apache/fluo/recipes/core/common/TableOptimizations.java
index 4657366..3f0e5f2 100644
--- a/modules/core/src/main/java/org/apache/fluo/recipes/core/common/TableOptimizations.java
+++ b/modules/core/src/main/java/org/apache/fluo/recipes/core/common/TableOptimizations.java
@@ -17,6 +17,7 @@ package org.apache.fluo.recipes.core.common;
 
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Objects;
 
@@ -25,8 +26,6 @@ import org.apache.fluo.api.client.FluoFactory;
 import org.apache.fluo.api.config.FluoConfiguration;
 import org.apache.fluo.api.config.SimpleConfiguration;
 import org.apache.fluo.api.data.Bytes;
-import org.apache.fluo.recipes.core.export.ExportQueue;
-import org.apache.fluo.recipes.core.map.CollisionFreeMap;
 
 /**
  * Post initialization recommended table optimizations.
@@ -67,16 +66,49 @@ public class TableOptimizations {
     }
   }
 
+  public static interface TableOptimizationsFactory {
+    TableOptimizations getTableOptimizations(String key, SimpleConfiguration appConfig);
+  }
+
+  private static final String PREFIX = "recipes.optimizations.";
+
+  /**
+   * This method provides a standard way to register a table optimization for the Fluo table
before
+   * initialization. After Fluo is initialized, the optimizations can be retrieved by calling
+   * {@link #getConfiguredOptimizations(FluoConfiguration)}.
+   * 
+   * @param application config, likely obtained from calling
+   *        {@link FluoConfiguration#getAppConfiguration()}
+   * @param key A unique identifier for the optimization
+   * @param clazz The optimization factory type.
+   */
+  public static void registerOptimization(SimpleConfiguration appConfig, String key,
+      Class<? extends TableOptimizationsFactory> clazz) {
+    appConfig.setProperty(PREFIX + key, clazz.getName());
+  }
+
   /**
-   * A utility method to get table optimizations for all configured recipes.
+   * A utility method to get all registered table optimizations. Many recipes will automatically
+   * register table optimizations when configured.
    */
   public static TableOptimizations getConfiguredOptimizations(FluoConfiguration fluoConfig)
{
     try (FluoClient client = FluoFactory.newClient(fluoConfig)) {
       SimpleConfiguration appConfig = client.getAppConfiguration();
       TableOptimizations tableOptim = new TableOptimizations();
 
-      tableOptim.merge(ExportQueue.getTableOptimizations(appConfig));
-      tableOptim.merge(CollisionFreeMap.getTableOptimizations(appConfig));
+      SimpleConfiguration subset = appConfig.subset(PREFIX.substring(0, PREFIX.length() -
1));
+      Iterator<String> keys = subset.getKeys();
+      while (keys.hasNext()) {
+        String key = keys.next();
+        String clazz = subset.getString(key);
+        try {
+          TableOptimizationsFactory factory =
+              Class.forName(clazz).asSubclass(TableOptimizationsFactory.class).newInstance();
+          tableOptim.merge(factory.getTableOptimizations(key, appConfig));
+        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException
e) {
+          throw new RuntimeException(e);
+        }
+      }
 
       return tableOptim;
     }

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/core/src/main/java/org/apache/fluo/recipes/core/data/RowHasher.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/recipes/core/data/RowHasher.java b/modules/core/src/main/java/org/apache/fluo/recipes/core/data/RowHasher.java
index 59aef51..3a17a3f 100644
--- a/modules/core/src/main/java/org/apache/fluo/recipes/core/data/RowHasher.java
+++ b/modules/core/src/main/java/org/apache/fluo/recipes/core/data/RowHasher.java
@@ -22,9 +22,12 @@ import java.util.regex.Pattern;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Strings;
 import com.google.common.hash.Hashing;
+import org.apache.fluo.api.config.FluoConfiguration;
+import org.apache.fluo.api.config.SimpleConfiguration;
 import org.apache.fluo.api.data.Bytes;
 import org.apache.fluo.api.data.Bytes.BytesBuilder;
 import org.apache.fluo.recipes.core.common.TableOptimizations;
+import org.apache.fluo.recipes.core.common.TableOptimizations.TableOptimizationsFactory;
 
 /**
  * This recipe provides code to help add a hash of the row as a prefix of the row. Using
this recipe
@@ -40,39 +43,82 @@ import org.apache.fluo.recipes.core.common.TableOptimizations;
  * <p>
  * The project documentation has more information.
  *
+ * <p>
+ * A single instance of RowHasher is thread safe. Creating a single static instance and using
it can
+ * result in good performance.
+ *
  * @since 1.0.0
  */
 public class RowHasher {
 
   private static final int HASH_LEN = 4;
+  private static final String PREFIX = "recipes.rowHasher.";
 
-  public TableOptimizations getTableOptimizations(int numTablets) {
+  public static class Optimizer implements TableOptimizationsFactory {
 
-    List<Bytes> splits = new ArrayList<>(numTablets - 1);
+    @Override
+    public TableOptimizations getTableOptimizations(String key, SimpleConfiguration appConfig)
{
+      int numTablets = appConfig.getInt(PREFIX + key + ".numTablets");
 
-    int numSplits = numTablets - 1;
-    int distance = (((int) Math.pow(Character.MAX_RADIX, HASH_LEN) - 1) / numTablets) + 1;
-    int split = distance;
-    for (int i = 0; i < numSplits; i++) {
-      splits.add(Bytes.of(prefix
-          + Strings.padStart(Integer.toString(split, Character.MAX_RADIX), HASH_LEN, '0')));
-      split += distance;
-    }
+      String prefix = key + ":";
+
+      List<Bytes> splits = new ArrayList<>(numTablets - 1);
 
-    splits.add(Bytes.of(prefix + "~"));
+      int numSplits = numTablets - 1;
+      int distance = (((int) Math.pow(Character.MAX_RADIX, HASH_LEN) - 1) / numTablets) +
1;
+      int split = distance;
+      for (int i = 0; i < numSplits; i++) {
+        splits.add(Bytes.of(prefix
+            + Strings.padStart(Integer.toString(split, Character.MAX_RADIX), HASH_LEN, '0')));
+        split += distance;
+      }
+
+      splits.add(Bytes.of(prefix + "~"));
 
 
-    TableOptimizations tableOptim = new TableOptimizations();
-    tableOptim.setSplits(splits);
-    tableOptim.setTabletGroupingRegex(Pattern.quote(prefix.toString()));
+      TableOptimizations tableOptim = new TableOptimizations();
+      tableOptim.setSplits(splits);
+      tableOptim.setTabletGroupingRegex(Pattern.quote(prefix.toString()));
+
+      return tableOptim;
+    }
 
-    return tableOptim;
   }
 
-  private Bytes prefix;
+  /**
+   * This method can be called to register table optimizations before initializing Fluo.
This will
+   * register {@link Optimizer} with
+   * {@link TableOptimizations#registerOptimization(SimpleConfiguration, String, Class)}.
See the
+   * project level documentation for an example.
+   *
+   * @param fluoConfig The config that will be used to initialize Fluo
+   * @param prefix The prefix used for your Row Hasher. If you have a single instance, could
call
+   *        {@link RowHasher#getPrefix()}.
+   * @param numTablets Initial number of tablet to create.
+   */
+  public static void configure(FluoConfiguration fluoConfig, String prefix, int numTablets)
{
+    fluoConfig.getAppConfiguration().setProperty(PREFIX + prefix + ".numTablets", numTablets);
+    TableOptimizations.registerOptimization(fluoConfig.getAppConfiguration(), prefix,
+        Optimizer.class);
+  }
+
+  private ThreadLocal<BytesBuilder> builders;
+  private Bytes prefixBytes;
+  private String prefix;
 
   public RowHasher(String prefix) {
-    this.prefix = Bytes.of(prefix + ":");
+    this.prefix = prefix;
+    this.prefixBytes = Bytes.of(prefix + ":");
+
+    builders = ThreadLocal.withInitial(() -> {
+      BytesBuilder bb = Bytes.builder(prefixBytes.length() + 5 + 32);
+      bb.append(prefixBytes);
+      return bb;
+    });
+  }
+
+  public String getPrefix() {
+    return prefix;
   }
 
   /**
@@ -86,8 +132,8 @@ public class RowHasher {
    * @return Returns input with prefix and hash of input prepended.
    */
   public Bytes addHash(Bytes row) {
-    BytesBuilder builder = Bytes.builder(prefix.length() + 5 + row.length());
-    builder.append(prefix);
+    BytesBuilder builder = builders.get();
+    builder.setLength(prefixBytes.length());
     builder.append(genHash(row));
     builder.append(":");
     builder.append(row);
@@ -95,7 +141,7 @@ public class RowHasher {
   }
 
   private boolean hasHash(Bytes row) {
-    for (int i = prefix.length(); i < prefix.length() + HASH_LEN; i++) {
+    for (int i = prefixBytes.length(); i < prefixBytes.length() + HASH_LEN; i++) {
       byte b = row.byteAt(i);
       boolean isAlphaNum = (b >= 'a' && b <= 'z') || (b >= '0' &&
b <= '9');
       if (!isAlphaNum) {
@@ -103,7 +149,8 @@ public class RowHasher {
       }
     }
 
-    if (row.byteAt(prefix.length() - 1) != ':' || row.byteAt(prefix.length() + HASH_LEN)
!= ':') {
+    if (row.byteAt(prefixBytes.length() - 1) != ':'
+        || row.byteAt(prefixBytes.length() + HASH_LEN) != ':') {
       return false;
     }
 
@@ -114,12 +161,12 @@ public class RowHasher {
    * @return Returns input with prefix and hash stripped from beginning.
    */
   public Bytes removeHash(Bytes row) {
-    Preconditions.checkArgument(row.length() >= prefix.length() + 5,
+    Preconditions.checkArgument(row.length() >= prefixBytes.length() + 5,
         "Row is shorter than expected " + row);
-    Preconditions.checkArgument(row.subSequence(0, prefix.length()).equals(prefix),
+    Preconditions.checkArgument(row.subSequence(0, prefixBytes.length()).equals(prefixBytes),
         "Row does not have expected prefix " + row);
     Preconditions.checkArgument(hasHash(row), "Row does not have expected hash " + row);
-    return row.subSequence(prefix.length() + 5, row.length());
+    return row.subSequence(prefixBytes.length() + 5, row.length());
   }
 
   private static String genHash(Bytes row) {
@@ -130,7 +177,6 @@ public class RowHasher {
     String hashString =
         Strings.padStart(Integer.toString(hash, Character.MAX_RADIX), HASH_LEN, '0');
     hashString = hashString.substring(hashString.length() - HASH_LEN);
-
     return hashString;
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/core/src/main/java/org/apache/fluo/recipes/core/export/ExportQueue.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/recipes/core/export/ExportQueue.java
b/modules/core/src/main/java/org/apache/fluo/recipes/core/export/ExportQueue.java
index 150503e..e30f7ce 100644
--- a/modules/core/src/main/java/org/apache/fluo/recipes/core/export/ExportQueue.java
+++ b/modules/core/src/main/java/org/apache/fluo/recipes/core/export/ExportQueue.java
@@ -32,6 +32,7 @@ import org.apache.fluo.api.config.ObserverSpecification;
 import org.apache.fluo.api.config.SimpleConfiguration;
 import org.apache.fluo.api.data.Bytes;
 import org.apache.fluo.recipes.core.common.TableOptimizations;
+import org.apache.fluo.recipes.core.common.TableOptimizations.TableOptimizationsFactory;
 import org.apache.fluo.recipes.core.common.RowRange;
 import org.apache.fluo.recipes.core.common.TransientRegistry;
 import org.apache.fluo.recipes.core.serialization.SimpleSerializer;
@@ -114,61 +115,48 @@ public class ExportQueue<K, V> {
 
     new TransientRegistry(fluoConfig.getAppConfiguration()).addTransientRange("exportQueue."
         + opts.queueId, new RowRange(exportRangeStart, exportRangeStop));
+
+    TableOptimizations.registerOptimization(appConfig, opts.queueId, Optimizer.class);
   }
 
-  /**
-   * Return suggested Fluo table optimizations for all previously configured export queues.
-   *
-   * @param appConfig Must pass in the application configuration obtained from
-   *        {@code FluoClient.getAppConfiguration()} or
-   *        {@code FluoConfiguration.getAppConfiguration()}
-   */
+  public static class Optimizer implements TableOptimizationsFactory {
 
-  public static TableOptimizations getTableOptimizations(SimpleConfiguration appConfig) {
-    HashSet<String> queueIds = new HashSet<>();
-    appConfig.getKeys(Options.PREFIX.substring(0, Options.PREFIX.length() - 1)).forEachRemaining(
-        k -> queueIds.add(k.substring(Options.PREFIX.length()).split("\\.", 2)[0]));
+    /**
+     * Return suggested Fluo table optimizations for the specified export queue.
+     *
+     * @param appConfig Must pass in the application configuration obtained from
+     *        {@code FluoClient.getAppConfiguration()} or
+     *        {@code FluoConfiguration.getAppConfiguration()}
+     */
+    @Override
+    public TableOptimizations getTableOptimizations(String queueId, SimpleConfiguration appConfig)
{
+      Options opts = new Options(queueId, appConfig);
 
-    TableOptimizations tableOptim = new TableOptimizations();
-    queueIds.forEach(qid -> tableOptim.merge(getTableOptimizations(qid, appConfig)));
+      List<Bytes> splits = new ArrayList<>();
 
-    return tableOptim;
-  }
+      Bytes exportRangeStart = Bytes.of(opts.queueId + RANGE_BEGIN);
+      Bytes exportRangeStop = Bytes.of(opts.queueId + RANGE_END);
 
-  /**
-   * Return suggested Fluo table optimizations for the specified export queue.
-   *
-   * @param appConfig Must pass in the application configuration obtained from
-   *        {@code FluoClient.getAppConfiguration()} or
-   *        {@code FluoConfiguration.getAppConfiguration()}
-   */
-  public static TableOptimizations getTableOptimizations(String queueId,
-      SimpleConfiguration appConfig) {
-    Options opts = new Options(queueId, appConfig);
+      splits.add(exportRangeStart);
+      splits.add(exportRangeStop);
 
-    List<Bytes> splits = new ArrayList<>();
+      List<Bytes> exportSplits = new ArrayList<>();
+      for (int i = opts.getBucketsPerTablet(); i < opts.numBuckets; i += opts.getBucketsPerTablet())
{
+        exportSplits.add(ExportBucket.generateBucketRow(opts.queueId, i, opts.numBuckets));
+      }
+      Collections.sort(exportSplits);
+      splits.addAll(exportSplits);
 
-    Bytes exportRangeStart = Bytes.of(opts.queueId + RANGE_BEGIN);
-    Bytes exportRangeStop = Bytes.of(opts.queueId + RANGE_END);
+      TableOptimizations tableOptim = new TableOptimizations();
+      tableOptim.setSplits(splits);
 
-    splits.add(exportRangeStart);
-    splits.add(exportRangeStop);
+      // the tablet with end row <queueId># does not contain any data for the export
queue and
+      // should not be grouped with the export queue
+      tableOptim.setTabletGroupingRegex(Pattern.quote(queueId + ":"));
 
-    List<Bytes> exportSplits = new ArrayList<>();
-    for (int i = opts.getBucketsPerTablet(); i < opts.numBuckets; i += opts.getBucketsPerTablet())
{
-      exportSplits.add(ExportBucket.generateBucketRow(opts.queueId, i, opts.numBuckets));
+      return tableOptim;
     }
-    Collections.sort(exportSplits);
-    splits.addAll(exportSplits);
-
-    TableOptimizations tableOptim = new TableOptimizations();
-    tableOptim.setSplits(splits);
-
-    // the tablet with end row <queueId># does not contain any data for the export
queue and
-    // should not be grouped with the export queue
-    tableOptim.setTabletGroupingRegex(Pattern.quote(queueId + ":"));
 
-    return tableOptim;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/core/src/main/java/org/apache/fluo/recipes/core/impl/BucketUtil.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/recipes/core/impl/BucketUtil.java
b/modules/core/src/main/java/org/apache/fluo/recipes/core/impl/BucketUtil.java
index 06bdfa8..be28878 100644
--- a/modules/core/src/main/java/org/apache/fluo/recipes/core/impl/BucketUtil.java
+++ b/modules/core/src/main/java/org/apache/fluo/recipes/core/impl/BucketUtil.java
@@ -15,10 +15,17 @@
 
 package org.apache.fluo.recipes.core.impl;
 
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+
 public class BucketUtil {
   public static String genBucketId(int bucket, int maxBucket) {
-    int bucketLen = Integer.toHexString(maxBucket).length();
-    // TODO printf is slow
-    return String.format("%0" + bucketLen + "x", bucket);
+    Preconditions.checkArgument(bucket >= 0);
+    Preconditions.checkArgument(maxBucket > 0);
+
+    int bits = 32 - Integer.numberOfLeadingZeros(maxBucket);
+    int bucketLen = bits / 4 + (bits % 4 > 0 ? 1 : 0);
+
+    return Strings.padStart(Integer.toHexString(bucket), bucketLen, '0');
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/core/src/main/java/org/apache/fluo/recipes/core/map/CollisionFreeMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/recipes/core/map/CollisionFreeMap.java
b/modules/core/src/main/java/org/apache/fluo/recipes/core/map/CollisionFreeMap.java
index 6e74c3c..d551096 100644
--- a/modules/core/src/main/java/org/apache/fluo/recipes/core/map/CollisionFreeMap.java
+++ b/modules/core/src/main/java/org/apache/fluo/recipes/core/map/CollisionFreeMap.java
@@ -45,6 +45,7 @@ import org.apache.fluo.api.data.RowColumn;
 import org.apache.fluo.api.data.RowColumnValue;
 import org.apache.fluo.api.data.Span;
 import org.apache.fluo.recipes.core.common.TableOptimizations;
+import org.apache.fluo.recipes.core.common.TableOptimizations.TableOptimizationsFactory;
 import org.apache.fluo.recipes.core.common.RowRange;
 import org.apache.fluo.recipes.core.common.TransientRegistry;
 import org.apache.fluo.recipes.core.impl.BucketUtil;
@@ -581,70 +582,59 @@ public class CollisionFreeMap<K, V> {
 
     new TransientRegistry(fluoConfig.getAppConfiguration()).addTransientRange("cfm." + opts.mapId,
         new RowRange(dataRangeEnd, updateRangeEnd));
-  }
-
-  /**
-   * Return suggested Fluo table optimizations for all previously configured collision free
maps.
-   *
-   * @param appConfig Must pass in the application configuration obtained from
-   *        {@code FluoClient.getAppConfiguration()} or
-   *        {@code FluoConfiguration.getAppConfiguration()}
-   */
-  public static TableOptimizations getTableOptimizations(SimpleConfiguration appConfig) {
-    HashSet<String> mapIds = new HashSet<>();
-    appConfig.getKeys(Options.PREFIX.substring(0, Options.PREFIX.length() - 1)).forEachRemaining(
-        k -> mapIds.add(k.substring(Options.PREFIX.length()).split("\\.", 2)[0]));
-
-    TableOptimizations tableOptim = new TableOptimizations();
-    mapIds.forEach(mid -> tableOptim.merge(getTableOptimizations(mid, appConfig)));
 
-    return tableOptim;
+    TableOptimizations.registerOptimization(fluoConfig.getAppConfiguration(), opts.mapId,
+        Optimizer.class);
   }
 
-  /**
-   * Return suggested Fluo table optimizations for the specified collisiong free map.
-   *
-   * @param appConfig Must pass in the application configuration obtained from
-   *        {@code FluoClient.getAppConfiguration()} or
-   *        {@code FluoConfiguration.getAppConfiguration()}
-   */
-  public static TableOptimizations getTableOptimizations(String mapId, SimpleConfiguration
appConfig) {
-    Options opts = new Options(mapId, appConfig);
-
-    BytesBuilder rowBuilder = Bytes.builder();
-    rowBuilder.append(mapId);
+  public static class Optimizer implements TableOptimizationsFactory {
 
-    List<Bytes> dataSplits = new ArrayList<>();
-    for (int i = opts.getBucketsPerTablet(); i < opts.numBuckets; i += opts.getBucketsPerTablet())
{
-      String bucketId = BucketUtil.genBucketId(i, opts.numBuckets);
-      rowBuilder.setLength(mapId.length());
-      dataSplits.add(rowBuilder.append(":d:").append(bucketId).toBytes());
-    }
-    Collections.sort(dataSplits);
+    /**
+     * Return suggested Fluo table optimizations for the specified collisiong free map.
+     *
+     * @param appConfig Must pass in the application configuration obtained from
+     *        {@code FluoClient.getAppConfiguration()} or
+     *        {@code FluoConfiguration.getAppConfiguration()}
+     */
+    @Override
+    public TableOptimizations getTableOptimizations(String mapId, SimpleConfiguration appConfig)
{
+      Options opts = new Options(mapId, appConfig);
+
+      BytesBuilder rowBuilder = Bytes.builder();
+      rowBuilder.append(mapId);
+
+      List<Bytes> dataSplits = new ArrayList<>();
+      for (int i = opts.getBucketsPerTablet(); i < opts.numBuckets; i += opts.getBucketsPerTablet())
{
+        String bucketId = BucketUtil.genBucketId(i, opts.numBuckets);
+        rowBuilder.setLength(mapId.length());
+        dataSplits.add(rowBuilder.append(":d:").append(bucketId).toBytes());
+      }
+      Collections.sort(dataSplits);
 
-    List<Bytes> updateSplits = new ArrayList<>();
-    for (int i = opts.getBucketsPerTablet(); i < opts.numBuckets; i += opts.getBucketsPerTablet())
{
-      String bucketId = BucketUtil.genBucketId(i, opts.numBuckets);
-      rowBuilder.setLength(mapId.length());
-      updateSplits.add(rowBuilder.append(":u:").append(bucketId).toBytes());
-    }
-    Collections.sort(updateSplits);
+      List<Bytes> updateSplits = new ArrayList<>();
+      for (int i = opts.getBucketsPerTablet(); i < opts.numBuckets; i += opts.getBucketsPerTablet())
{
+        String bucketId = BucketUtil.genBucketId(i, opts.numBuckets);
+        rowBuilder.setLength(mapId.length());
+        updateSplits.add(rowBuilder.append(":u:").append(bucketId).toBytes());
+      }
+      Collections.sort(updateSplits);
 
-    Bytes dataRangeEnd = Bytes.of(opts.mapId + DATA_RANGE_END);
-    Bytes updateRangeEnd = Bytes.of(opts.mapId + UPDATE_RANGE_END);
+      Bytes dataRangeEnd = Bytes.of(opts.mapId + DATA_RANGE_END);
+      Bytes updateRangeEnd = Bytes.of(opts.mapId + UPDATE_RANGE_END);
 
-    List<Bytes> splits = new ArrayList<>();
-    splits.add(dataRangeEnd);
-    splits.add(updateRangeEnd);
-    splits.addAll(dataSplits);
-    splits.addAll(updateSplits);
+      List<Bytes> splits = new ArrayList<>();
+      splits.add(dataRangeEnd);
+      splits.add(updateRangeEnd);
+      splits.addAll(dataSplits);
+      splits.addAll(updateSplits);
 
-    TableOptimizations tableOptim = new TableOptimizations();
-    tableOptim.setSplits(splits);
+      TableOptimizations tableOptim = new TableOptimizations();
+      tableOptim.setSplits(splits);
 
-    tableOptim.setTabletGroupingRegex(Pattern.quote(mapId + ":") + "[du]:");
+      tableOptim.setTabletGroupingRegex(Pattern.quote(mapId + ":") + "[du]:");
 
-    return tableOptim;
+      return tableOptim;
+    }
   }
 
   private static byte[] encSeq(long l) {

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/core/src/main/java/org/apache/fluo/recipes/core/types/TypedTransactionBase.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/fluo/recipes/core/types/TypedTransactionBase.java
b/modules/core/src/main/java/org/apache/fluo/recipes/core/types/TypedTransactionBase.java
index 7fa69c3..cdb2345 100644
--- a/modules/core/src/main/java/org/apache/fluo/recipes/core/types/TypedTransactionBase.java
+++ b/modules/core/src/main/java/org/apache/fluo/recipes/core/types/TypedTransactionBase.java
@@ -106,9 +106,10 @@ public class TypedTransactionBase extends TypedSnapshotBase implements
Transacti
      * have a current value, then it defaults to zero.
      *
      * @param i Integer increment amount
+     * @return The current value (before incrementing). If there is no current value, returns
0.
      * @throws AlreadySetException if value was previously set in transaction
      */
-    public void increment(int i) throws AlreadySetException {
+    public int increment(int i) throws AlreadySetException {
       checkNotSet();
       Bytes val = tx.get(data.row, data.getCol());
       int v = 0;
@@ -116,6 +117,8 @@ public class TypedTransactionBase extends TypedSnapshotBase implements
Transacti
         v = encoder.decodeInteger(val);
       }
       tx.set(data.row, data.getCol(), encoder.encode(v + i));
+
+      return v;
     }
 
     /**
@@ -123,9 +126,10 @@ public class TypedTransactionBase extends TypedSnapshotBase implements
Transacti
      * have a current value, then it defaults to zero.
      *
      * @param l Long increment amount
+     * @return The current value (before incrementing). If there is no current value, returns
0.
      * @throws AlreadySetException if value was previously set in transaction
      */
-    public void increment(long l) throws AlreadySetException {
+    public long increment(long l) throws AlreadySetException {
       checkNotSet();
       Bytes val = tx.get(data.row, data.getCol());
       long v = 0;
@@ -133,6 +137,8 @@ public class TypedTransactionBase extends TypedSnapshotBase implements
Transacti
         v = encoder.decodeLong(val);
       }
       tx.set(data.row, data.getCol(), encoder.encode(v + l));
+
+      return v;
     }
 
     public void delete() throws AlreadySetException {

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/core/src/test/java/org/apache/fluo/recipes/core/common/TestGrouping.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/fluo/recipes/core/common/TestGrouping.java
b/modules/core/src/test/java/org/apache/fluo/recipes/core/common/TestGrouping.java
index 8ceda12..2159b61 100644
--- a/modules/core/src/test/java/org/apache/fluo/recipes/core/common/TestGrouping.java
+++ b/modules/core/src/test/java/org/apache/fluo/recipes/core/common/TestGrouping.java
@@ -21,6 +21,7 @@ import java.util.regex.Pattern;
 
 import com.google.common.collect.ImmutableSet;
 import org.apache.fluo.api.config.FluoConfiguration;
+import org.apache.fluo.api.config.SimpleConfiguration;
 import org.apache.fluo.api.data.Bytes;
 import org.apache.fluo.recipes.core.export.ExportQueue;
 import org.apache.fluo.recipes.core.map.CollisionFreeMap;
@@ -39,9 +40,14 @@ public class TestGrouping {
     ExportQueue.configure(conf, new ExportQueue.Options("eq1", "et", "kt", "vt", 7));
     ExportQueue.configure(conf, new ExportQueue.Options("eq2", "et", "kt", "vt", 3));
 
+
+    SimpleConfiguration appConfg = conf.getAppConfiguration();
+
     TableOptimizations tableOptim =
-        CollisionFreeMap.getTableOptimizations(conf.getAppConfiguration());
-    tableOptim.merge(ExportQueue.getTableOptimizations(conf.getAppConfiguration()));
+        new CollisionFreeMap.Optimizer().getTableOptimizations("m1", appConfg);
+    tableOptim.merge(new CollisionFreeMap.Optimizer().getTableOptimizations("m2", appConfg));
+    tableOptim.merge(new ExportQueue.Optimizer().getTableOptimizations("eq1", appConfg));
+    tableOptim.merge(new ExportQueue.Optimizer().getTableOptimizations("eq2", appConfg));
 
     Pattern pattern = Pattern.compile(tableOptim.getTabletGroupingRegex());
 

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/core/src/test/java/org/apache/fluo/recipes/core/data/RowHasherTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/fluo/recipes/core/data/RowHasherTest.java
b/modules/core/src/test/java/org/apache/fluo/recipes/core/data/RowHasherTest.java
index 9250d73..e69c9c5 100644
--- a/modules/core/src/test/java/org/apache/fluo/recipes/core/data/RowHasherTest.java
+++ b/modules/core/src/test/java/org/apache/fluo/recipes/core/data/RowHasherTest.java
@@ -15,7 +15,11 @@
 
 package org.apache.fluo.recipes.core.data;
 
+import java.util.Arrays;
+
+import org.apache.fluo.api.config.FluoConfiguration;
 import org.apache.fluo.api.data.Bytes;
+import org.apache.fluo.recipes.core.common.TableOptimizations;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -55,8 +59,13 @@ public class RowHasherTest {
 
   @Test
   public void testBalancerRegex() {
-    RowHasher rh = new RowHasher("p");
-    String regex = rh.getTableOptimizations(3).getTabletGroupingRegex();
+    FluoConfiguration fc = new FluoConfiguration();
+    RowHasher.configure(fc, "p", 3);
+    TableOptimizations optimizations =
+        new RowHasher.Optimizer().getTableOptimizations("p", fc.getAppConfiguration());
+    String regex = optimizations.getTabletGroupingRegex();
     Assert.assertEquals("(\\Qp:\\E).*", regex);
+    Assert.assertEquals(Arrays.asList(Bytes.of("p:c000"), Bytes.of("p:o000"), Bytes.of("p:~")),
+        optimizations.getSplits());
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/core/src/test/java/org/apache/fluo/recipes/core/map/SplitsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/fluo/recipes/core/map/SplitsTest.java b/modules/core/src/test/java/org/apache/fluo/recipes/core/map/SplitsTest.java
index 8259469..37a2443 100644
--- a/modules/core/src/test/java/org/apache/fluo/recipes/core/map/SplitsTest.java
+++ b/modules/core/src/test/java/org/apache/fluo/recipes/core/map/SplitsTest.java
@@ -44,7 +44,8 @@ public class SplitsTest {
     CollisionFreeMap.configure(fluoConfig, opts);
 
     TableOptimizations tableOptim1 =
-        CollisionFreeMap.getTableOptimizations("foo", fluoConfig.getAppConfiguration());
+        new CollisionFreeMap.Optimizer().getTableOptimizations("foo",
+            fluoConfig.getAppConfiguration());
     List<Bytes> expected1 =
         Lists.transform(
             Arrays.asList("foo:d:1", "foo:d:2", "foo:d:~", "foo:u:1", "foo:u:2", "foo:u:~"),
@@ -57,20 +58,12 @@ public class SplitsTest {
     CollisionFreeMap.configure(fluoConfig, opts2);
 
     TableOptimizations tableOptim2 =
-        CollisionFreeMap.getTableOptimizations("bar", fluoConfig.getAppConfiguration());
+        new CollisionFreeMap.Optimizer().getTableOptimizations("bar",
+            fluoConfig.getAppConfiguration());
     List<Bytes> expected2 =
         Lists.transform(
             Arrays.asList("bar:d:2", "bar:d:4", "bar:d:~", "bar:u:2", "bar:u:4", "bar:u:~"),
             Bytes::of);
     Assert.assertEquals(expected2, sort(tableOptim2.getSplits()));
-
-    TableOptimizations tableOptim3 =
-        CollisionFreeMap.getTableOptimizations(fluoConfig.getAppConfiguration());
-
-    ArrayList<Bytes> expected3 = new ArrayList<>(expected2);
-    expected3.addAll(expected1);
-
-    Assert.assertEquals(expected3, sort(tableOptim3.getSplits()));
-
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/core/src/test/java/org/apache/fluo/recipes/core/types/TypeLayerTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/fluo/recipes/core/types/TypeLayerTest.java
b/modules/core/src/test/java/org/apache/fluo/recipes/core/types/TypeLayerTest.java
index 6b38e12..8b3decf 100644
--- a/modules/core/src/test/java/org/apache/fluo/recipes/core/types/TypeLayerTest.java
+++ b/modules/core/src/test/java/org/apache/fluo/recipes/core/types/TypeLayerTest.java
@@ -261,38 +261,42 @@ public class TypeLayerTest {
 
     MockTransactionBase tt =
         new MockTransactionBase("r1,cf1:cq1,v1", "r1,cf1:cq2,v2", "r1,cf1:cq3,9", "r2,cf2:7,12",
-            "r2,cf2:8,13", "13,9:17,20", "13,9:18,20", "13,9:19,20", "13,9:20,20");
+            "r2,cf2:8,13", "13,9:17,20", "13,9:18,30", "13,9:19,40", "13,9:20,50");
 
     TypedTransactionBase ttx = tl.wrap(tt);
 
     // test increments data
-    ttx.mutate().row("13").fam("9").qual("17").increment(1);
-    ttx.mutate().row("13").fam("9").qual(18).increment(2);
-    ttx.mutate().row("13").fam("9").qual(19l).increment(3);
-    ttx.mutate().row("13").fam("9").qual("20".getBytes()).increment(4);
-    ttx.mutate().row("13").fam("9").qual(Bytes.of("21")).increment(5); // increment non existent
-    ttx.mutate().row("13").col(new Column("9", "22")).increment(6); // increment non existent
-    ttx.mutate().row("13").fam("9").qual(ByteBuffer.wrap("23".getBytes())).increment(7);
// increment
-                                                                                        
// non
-                                                                                        
// existent
-
-    Assert.assertEquals(MockTransactionBase.toRCVM("13,9:17,21", "13,9:18,22", "13,9:19,23",
-        "13,9:20,24", "13,9:21,5", "13,9:22,6", "13,9:23,7"), tt.setData);
+    Assert.assertEquals(20, ttx.mutate().row("13").fam("9").qual("17").increment(1));
+    Assert.assertEquals(30, ttx.mutate().row("13").fam("9").qual(18).increment(2));
+    Assert.assertEquals(40, ttx.mutate().row("13").fam("9").qual(19l).increment(3));
+    Assert.assertEquals(50, ttx.mutate().row("13").fam("9").qual("20".getBytes()).increment(4));
+    // increment non existent
+    Assert.assertEquals(0, ttx.mutate().row("13").fam("9").qual(Bytes.of("21")).increment(5));
+    // increment non existent
+    Assert.assertEquals(0, ttx.mutate().row("13").col(new Column("9", "22")).increment(6));
+    // increment non existent
+    Assert.assertEquals(0, ttx.mutate().row("13").fam("9").qual(ByteBuffer.wrap("23".getBytes()))
+        .increment(7));
+
+    Assert.assertEquals(MockTransactionBase.toRCVM("13,9:17,21", "13,9:18,32", "13,9:19,43",
+        "13,9:20,54", "13,9:21,5", "13,9:22,6", "13,9:23,7"), tt.setData);
     tt.setData.clear();
 
     // test increments long
-    ttx.mutate().row("13").fam("9").qual("17").increment(1l);
-    ttx.mutate().row("13").fam("9").qual(18).increment(2l);
-    ttx.mutate().row("13").fam("9").qual(19l).increment(3l);
-    ttx.mutate().row("13").fam("9").qual("20".getBytes()).increment(4l);
-    ttx.mutate().row("13").fam("9").qual(Bytes.of("21")).increment(5l); // increment non
existent
-    ttx.mutate().row("13").col(new Column("9", "22")).increment(6l); // increment non existent
-    ttx.mutate().row("13").fam("9").qual(ByteBuffer.wrap("23".getBytes())).increment(7l);
// increment
-                                                                                        
 // non
-                                                                                        
 // existent
-
-    Assert.assertEquals(MockTransactionBase.toRCVM("13,9:17,21", "13,9:18,22", "13,9:19,23",
-        "13,9:20,24", "13,9:21,5", "13,9:22,6", "13,9:23,7"), tt.setData);
+    Assert.assertEquals(20l, ttx.mutate().row("13").fam("9").qual("17").increment(1l));
+    Assert.assertEquals(30l, ttx.mutate().row("13").fam("9").qual(18).increment(2l));
+    Assert.assertEquals(40l, ttx.mutate().row("13").fam("9").qual(19l).increment(3l));
+    Assert.assertEquals(50l, ttx.mutate().row("13").fam("9").qual("20".getBytes()).increment(4l));
+    // increment non existent
+    Assert.assertEquals(0l, ttx.mutate().row("13").fam("9").qual(Bytes.of("21")).increment(5l));
+    // increment non existent
+    Assert.assertEquals(0l, ttx.mutate().row("13").col(new Column("9", "22")).increment(6l));
+    // increment non existent
+    Assert.assertEquals(0l, ttx.mutate().row("13").fam("9").qual(ByteBuffer.wrap("23".getBytes()))
+        .increment(7l));
+
+    Assert.assertEquals(MockTransactionBase.toRCVM("13,9:17,21", "13,9:18,32", "13,9:19,43",
+        "13,9:20,54", "13,9:21,5", "13,9:22,6", "13,9:23,7"), tt.setData);
     tt.setData.clear();
 
     // test setting data

http://git-wip-us.apache.org/repos/asf/incubator-fluo-recipes/blob/f4e97138/modules/test/src/main/java/org/apache/fluo/recipes/test/AccumuloExportITBase.java
----------------------------------------------------------------------
diff --git a/modules/test/src/main/java/org/apache/fluo/recipes/test/AccumuloExportITBase.java
b/modules/test/src/main/java/org/apache/fluo/recipes/test/AccumuloExportITBase.java
index d0c753c..ba7b1e6 100644
--- a/modules/test/src/main/java/org/apache/fluo/recipes/test/AccumuloExportITBase.java
+++ b/modules/test/src/main/java/org/apache/fluo/recipes/test/AccumuloExportITBase.java
@@ -180,9 +180,7 @@ public class AccumuloExportITBase {
    * initialized before MiniFluo is started.
    */
   protected void postFluoInitHook() throws Exception {
-    // TODO maybe remove
-    TableOperations.optimizeTable(fluoConfig,
-        TableOptimizations.getConfiguredOptimizations(fluoConfig));
+    TableOperations.optimizeTable(fluoConfig);
   }
 
   /**



Mime
View raw message