in phrasecount/src/main/java/phrasecount/cmd/Split.java [34:56]
public static void main(String[] args) throws Exception {
if (args.length != 2) {
System.err.println("Usage : " + Split.class.getName() + " <fluo props file> <table name>");
System.exit(-1);
}
FluoConfiguration fluoConfig = new FluoConfiguration(new File(args[0]));
ZooKeeperInstance zki =
new ZooKeeperInstance(fluoConfig.getAccumuloInstance(), fluoConfig.getAccumuloZookeepers());
Connector conn = zki.getConnector(fluoConfig.getAccumuloUser(),
new PasswordToken(fluoConfig.getAccumuloPassword()));
SortedSet<Text> splits = new TreeSet<>();
for (char c = 'b'; c < 'z'; c++) {
splits.add(new Text("phrase:" + c));
}
conn.tableOperations().addSplits(args[1], splits);
// TODO figure what threads are hanging around
System.exit(0);
}