Class DeterminePartitionsJob

  • All Implemented Interfaces:
    org.apache.druid.indexer.Jobby

    public class DeterminePartitionsJob
    extends Object
    implements org.apache.druid.indexer.Jobby
    Determines appropriate ShardSpecs for a job by determining whether or not partitioning is necessary, and if so, choosing the best dimension that satisfies the criteria:

    • Must have exactly one value per row.
    • Must not generate oversized partitions. A dimension with N rows having the same value will necessarily put all those rows in the same partition, and that partition may be much larger than the target size.

    "Best" means a very high cardinality dimension, or, if none exist, the dimension that minimizes variation of segment size relative to the target.

    • Method Detail

      • run

        public boolean run()
        Specified by:
        run in interface org.apache.druid.indexer.Jobby
      • getStats

        public Map<String,​Object> getStats()
        Specified by:
        getStats in interface org.apache.druid.indexer.Jobby
      • getErrorMessage

        @Nullable
        public String getErrorMessage()
        Specified by:
        getErrorMessage in interface org.apache.druid.indexer.Jobby