public static void main()

in stresso/src/main/java/stresso/trie/CompactLL.java [33:69]


  public static void main(String[] args) throws Exception {

    if (args.length != 4) {
      System.err.println(
          "Usage: " + Split.class.getSimpleName() + " <fluo conn props> <app name> <max> <cutoff>");
      System.exit(-1);
    }

    FluoConfiguration config = new FluoConfiguration(new File(args[0]));
    config.setApplicationName(args[1]);

    long max = Long.parseLong(args[2]);

    // compact levels that can contain less nodes than this
    int cutoff = Integer.parseInt(args[3]);

    StressoConfig sconf = StressoConfig.retrieve(config);

    int level = 64 / sconf.nodeSize;

    while (level >= sconf.stopLevel) {
      if (max < cutoff) {
        break;
      }

      max = max >> 8;
      level--;
    }

    String start = String.format("%02d", sconf.stopLevel);
    String end = String.format("%02d:~", (level));

    System.out.println("Compacting " + start + " to " + end);
    AccumuloUtil.doTableOp(config,
        (tableOps, table) -> tableOps.compact(table, new Text(start), new Text(end), true, false));
    System.exit(0);
  }