Merge remote-tracking branch 'mike/package-refactor'
authorKeith Turner <kturner@apache.org>
Fri, 15 Jul 2016 22:01:55 +0000 (18:01 -0400)
committerKeith Turner <kturner@apache.org>
Fri, 15 Jul 2016 22:01:55 +0000 (18:01 -0400)
Conflicts:
docs/row-hasher.md
modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/cmds/OptimizeTable.java
modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/ops/TableOperations.java
modules/core/src/main/java/org/apache/fluo/recipes/common/Pirtos.java
modules/core/src/main/java/org/apache/fluo/recipes/common/TableOptimizations.java
modules/core/src/main/java/org/apache/fluo/recipes/core/common/Pirtos.java
modules/core/src/main/java/org/apache/fluo/recipes/core/data/RowHasher.java
modules/core/src/main/java/org/apache/fluo/recipes/core/export/ExportQueue.java
modules/core/src/main/java/org/apache/fluo/recipes/core/map/CollisionFreeMap.java
modules/core/src/test/java/org/apache/fluo/recipes/core/map/SplitsTest.java
modules/test/src/main/java/org/apache/fluo/recipes/test/AccumuloExportITBase.java

1  2 
docs/row-hasher.md
modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/cmds/OptimizeTable.java
modules/accumulo/src/main/java/org/apache/fluo/recipes/accumulo/ops/TableOperations.java
modules/core/src/main/java/org/apache/fluo/recipes/core/common/TableOptimizations.java
modules/core/src/main/java/org/apache/fluo/recipes/core/data/RowHasher.java
modules/core/src/main/java/org/apache/fluo/recipes/core/export/ExportQueue.java
modules/core/src/main/java/org/apache/fluo/recipes/core/map/CollisionFreeMap.java
modules/core/src/test/java/org/apache/fluo/recipes/core/common/TestGrouping.java
modules/core/src/test/java/org/apache/fluo/recipes/core/map/SplitsTest.java
modules/test/src/main/java/org/apache/fluo/recipes/test/AccumuloExportITBase.java

@@@ -31,8 -31,8 +31,8 @@@ balancing of the prefix
  
  ```java
  import org.apache.fluo.api.data.Bytes;
- import org.apache.fluo.recipes.common.TableOptimizations;
- import org.apache.fluo.recipes.data.RowHasher;
 -import org.apache.fluo.recipes.core.common.Pirtos;
++import org.apache.fluo.recipes.core.common.TableOptimizations;
+ import org.apache.fluo.recipes.core.data.RowHasher;
  
  public class RowHasherExample {
  
@@@ -19,8 -19,11 +19,11 @@@ import javax.inject.Inject
  
  import org.apache.fluo.api.config.FluoConfiguration;
  import org.apache.fluo.recipes.accumulo.ops.TableOperations;
- import org.apache.fluo.recipes.common.TableOptimizations;
 -import org.apache.fluo.recipes.core.common.Pirtos;
++import org.apache.fluo.recipes.core.common.TableOptimizations;
  
+ /**
+  * @since 1.0.0
+  */
  public class OptimizeTable {
  
    // when run with fluo exec command, the applications fluo config will be injected
@@@ -33,9 -36,7 +36,8 @@@
        System.exit(-1);
      }
  
 -    TableOperations.optimizeTable(fluoConfig, Pirtos.getConfiguredOptimizations(fluoConfig));
 +    TableOperations.optimizeTable(fluoConfig,
 +        TableOptimizations.getConfiguredOptimizations(fluoConfig));
      System.out.println("Finished optimizing table");
    }
  }
@@@ -28,9 -28,9 +28,9 @@@ import org.apache.fluo.api.client.FluoF
  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.common.TableOptimizations;
- import org.apache.fluo.recipes.common.RowRange;
- import org.apache.fluo.recipes.common.TransientRegistry;
 -import org.apache.fluo.recipes.core.common.Pirtos;
++import org.apache.fluo.recipes.core.common.TableOptimizations;
+ import org.apache.fluo.recipes.core.common.RowRange;
+ import org.apache.fluo.recipes.core.common.TransientRegistry;
  import org.apache.hadoop.io.Text;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
@@@ -30,8 -30,10 +30,10 @@@ import org.apache.fluo.recipes.core.map
  
  /**
   * Post initialization recommended table optimizations.
+  *
+  * @since 1.0.0
   */
 -public class Pirtos {
 +public class TableOptimizations {
    private List<Bytes> splits = new ArrayList<>();
    private String tabletGroupingRegex = "";
  
@@@ -24,7 -24,7 +24,7 @@@ import com.google.common.base.Strings
  import com.google.common.hash.Hashing;
  import org.apache.fluo.api.data.Bytes;
  import org.apache.fluo.api.data.BytesBuilder;
- import org.apache.fluo.recipes.common.TableOptimizations;
 -import org.apache.fluo.recipes.core.common.Pirtos;
++import org.apache.fluo.recipes.core.common.TableOptimizations;
  
  /**
   * This recipe provides code to help add a hash of the row as a prefix of the row. Using this recipe
@@@ -30,11 -30,14 +30,14 @@@ import org.apache.fluo.api.config.FluoC
  import org.apache.fluo.api.config.ObserverConfiguration;
  import org.apache.fluo.api.config.SimpleConfiguration;
  import org.apache.fluo.api.data.Bytes;
- import org.apache.fluo.recipes.common.TableOptimizations;
- import org.apache.fluo.recipes.common.RowRange;
- import org.apache.fluo.recipes.common.TransientRegistry;
- import org.apache.fluo.recipes.serialization.SimpleSerializer;
 -import org.apache.fluo.recipes.core.common.Pirtos;
++import org.apache.fluo.recipes.core.common.TableOptimizations;
+ import org.apache.fluo.recipes.core.common.RowRange;
+ import org.apache.fluo.recipes.core.common.TransientRegistry;
+ import org.apache.fluo.recipes.core.serialization.SimpleSerializer;
  
+ /**
+  * @since 1.0.0
+  */
  public class ExportQueue<K, V> {
  
    private static final String RANGE_BEGIN = "#";
@@@ -47,11 -47,11 +47,11 @@@ import org.apache.fluo.api.data.RowColu
  import org.apache.fluo.api.data.Span;
  import org.apache.fluo.api.iterator.ColumnIterator;
  import org.apache.fluo.api.iterator.RowIterator;
- import org.apache.fluo.recipes.common.TableOptimizations;
- import org.apache.fluo.recipes.common.RowRange;
- import org.apache.fluo.recipes.common.TransientRegistry;
- import org.apache.fluo.recipes.impl.BucketUtil;
- import org.apache.fluo.recipes.serialization.SimpleSerializer;
 -import org.apache.fluo.recipes.core.common.Pirtos;
++import org.apache.fluo.recipes.core.common.TableOptimizations;
+ import org.apache.fluo.recipes.core.common.RowRange;
+ import org.apache.fluo.recipes.core.common.TransientRegistry;
+ import org.apache.fluo.recipes.core.impl.BucketUtil;
+ import org.apache.fluo.recipes.core.serialization.SimpleSerializer;
  
  /**
   * See the project level documentation for information about this recipe.
@@@ -36,16 -36,13 +36,14 @@@ public class TestGrouping 
      CollisionFreeMap.configure(conf, new Options("m1", "ct", "kt", "vt", 119));
      CollisionFreeMap.configure(conf, new Options("m2", "ct", "kt", "vt", 3));
  
-     ExportQueue.configure(conf, new org.apache.fluo.recipes.export.ExportQueue.Options("eq1", "et",
-         "kt", "vt", 7));
-     ExportQueue.configure(conf, new org.apache.fluo.recipes.export.ExportQueue.Options("eq2", "et",
-         "kt", "vt", 3));
+     ExportQueue.configure(conf, new ExportQueue.Options("eq1", "et", "kt", "vt", 7));
+     ExportQueue.configure(conf, new ExportQueue.Options("eq2", "et", "kt", "vt", 3));
  
 -    Pirtos pirtos = CollisionFreeMap.getTableOptimizations(conf.getAppConfiguration());
 -    pirtos.merge(ExportQueue.getTableOptimizations(conf.getAppConfiguration()));
 +    TableOptimizations tableOptim =
 +        CollisionFreeMap.getTableOptimizations(conf.getAppConfiguration());
 +    tableOptim.merge(ExportQueue.getTableOptimizations(conf.getAppConfiguration()));
  
 -    Pattern pattern = Pattern.compile(pirtos.getTabletGroupingRegex());
 +    Pattern pattern = Pattern.compile(tableOptim.getTabletGroupingRegex());
  
      Assert.assertEquals("m1:u:", group(pattern, "m1:u:f0c"));
      Assert.assertEquals("m1:d:", group(pattern, "m1:d:f0c"));
@@@ -23,8 -23,8 +23,8 @@@ import java.util.List
  import com.google.common.collect.Lists;
  import org.apache.fluo.api.config.FluoConfiguration;
  import org.apache.fluo.api.data.Bytes;
- import org.apache.fluo.recipes.common.TableOptimizations;
- import org.apache.fluo.recipes.map.CollisionFreeMap.Options;
 -import org.apache.fluo.recipes.core.common.Pirtos;
++import org.apache.fluo.recipes.core.common.TableOptimizations;
+ import org.apache.fluo.recipes.core.map.CollisionFreeMap.Options;
  import org.junit.Assert;
  import org.junit.Test;
  
@@@ -31,7 -31,7 +31,7 @@@ import org.apache.fluo.api.client.FluoF
  import org.apache.fluo.api.config.FluoConfiguration;
  import org.apache.fluo.api.mini.MiniFluo;
  import org.apache.fluo.recipes.accumulo.ops.TableOperations;
- import org.apache.fluo.recipes.common.TableOptimizations;
 -import org.apache.fluo.recipes.core.common.Pirtos;
++import org.apache.fluo.recipes.core.common.TableOptimizations;
  import org.junit.After;
  import org.junit.AfterClass;
  import org.junit.Before;