Class DynamicPartitionsSpec

  • All Implemented Interfaces:
    PartitionsSpec

    public class DynamicPartitionsSpec
    extends Object
    implements PartitionsSpec
    Dynamically determine partitions in the middle of indexing.
    • Field Detail

      • DEFAULT_MAX_TOTAL_ROWS

        public static final long DEFAULT_MAX_TOTAL_ROWS
        Default maxTotalRows for most task types except compaction task.
        See Also:
        Constant Field Values
    • Method Detail

      • getMaxRowsPerSegment

        public Integer getMaxRowsPerSegment()
        Description copied from interface: PartitionsSpec
        Returns the max number of rows per segment. Implementations can have different default values which it could be even null. Callers should use the right value depending on the context if this returns null.
        Specified by:
        getMaxRowsPerSegment in interface PartitionsSpec
      • getMaxTotalRowsOr

        public long getMaxTotalRowsOr​(long defaultMaxTotalRows)
        Get the given maxTotalRows or the default. The default can be different depending on the caller.
      • needsDeterminePartitions

        public boolean needsDeterminePartitions​(boolean useForHadoopTask)
        Description copied from interface: PartitionsSpec
        Returns true if this partitionsSpec needs to determine the number of partitions to start data ingestion. It should usually return true if perfect rollup is enforced but number of partitions is not specified.
        Specified by:
        needsDeterminePartitions in interface PartitionsSpec
      • getForceGuaranteedRollupIncompatiblityReason

        public String getForceGuaranteedRollupIncompatiblityReason()
        Specified by:
        getForceGuaranteedRollupIncompatiblityReason in interface PartitionsSpec
        Returns:
        Message describing why this partitionSpec is incompatible with forceGuaranteedRollup=true. Empty string if the partitionSpec is compatible.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object