in stresso/src/main/java/stresso/trie/Split.java [43:77]
public static void main(String[] args) throws Exception {
if (args.length != 4) {
System.err.println("Usage: " + Split.class.getSimpleName()
+ " <fluo conn props> <app name> <table props> <tablets per level>");
System.exit(-1);
}
FluoConfiguration config = new FluoConfiguration(new File(args[0]));
config.setApplicationName(args[1]);
int maxTablets = Integer.parseInt(args[3]);
StressoConfig sconf = StressoConfig.retrieve(config);
AccumuloUtil.doTableOp(config, (tableOps, table) -> {
setupBalancer(tableOps, table);
int level = 64 / sconf.nodeSize;
while (level >= sconf.stopLevel) {
int numTablets = maxTablets;
if (numTablets == 0) {
break;
}
TreeSet<Text> splits = genSplits(level, numTablets);
tableOps.addSplits(table, splits);
System.out.printf("Added %d tablets for level %d\n", numTablets, level);
level--;
}
optimizeAccumulo(tableOps, table, args[2]);
});
}