Fluo Recipes 1.2.0 documentation >> Tools >> Table Optimization
Recipes may need to make Accumulo specific table modifications for optimal performance. Configuring the Accumulo tablet balancer and adding splits are two optimizations that are currently done. Offering a standard way to do these optimizations makes it easier to use recipes correctly. These optimizations are optional. You could skip them for integration testing, but would probably want to use them in production.
FluoConfiguration fluoConf = ... //export queue configure method will return table optimizations it would like made 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 TableOperations.optimizeTable(fluoConf);
TableOperations is provided in the Accumulo module of Fluo Recipes.
Fluo Recipes provides an easy way to optimize a Fluo table for configured recipes from the command line. This should be done after configuring recipes and initializing Fluo. Below are example command for initializing in this way.
#create application fluo new app1 #configure application #initialize Fluo fluo init app1 #optimize table for all configured recipes fluo exec app1 org.apache.fluo.recipes.accumulo.cmds.OptimizeTable
Recipes register themselves by calling TableOptimizations.registerOptimization(). Anyone can use this mechanism, its not limited to use by existing recipes.