public TableOptimizations getTableOptimizations()

in modules/core/src/main/java/org/apache/fluo/recipes/core/export/ExportQueue.java [211:237]


    public TableOptimizations getTableOptimizations(String queueId, SimpleConfiguration appConfig) {
      FluentConfigurator opts = FluentConfigurator.load(queueId, appConfig);

      List<Bytes> splits = new ArrayList<>();

      Bytes exportRangeStart = Bytes.of(opts.queueId + RANGE_BEGIN);
      Bytes exportRangeStop = Bytes.of(opts.queueId + RANGE_END);

      splits.add(exportRangeStart);
      splits.add(exportRangeStop);

      List<Bytes> exportSplits = new ArrayList<>();
      for (int i = opts.getBucketsPerTablet(); i < opts.buckets; i += opts.getBucketsPerTablet()) {
        exportSplits.add(ExportBucket.generateBucketRow(opts.queueId, i, opts.buckets));
      }
      Collections.sort(exportSplits);
      splits.addAll(exportSplits);

      TableOptimizations tableOptim = new TableOptimizations();
      tableOptim.setSplits(splits);

      // the tablet with end row <queueId># does not contain any data for the export queue and
      // should not be grouped with the export queue
      tableOptim.setTabletGroupingRegex(Pattern.quote(queueId + ":"));

      return tableOptim;
    }