Class BaseGranularitySpec

java.lang.Object
org.apache.druid.indexer.granularity.BaseGranularitySpec
All Implemented Interfaces:
GranularitySpec
Direct Known Subclasses:
ArbitraryGranularitySpec, UniformGranularitySpec

public abstract class BaseGranularitySpec extends Object implements GranularitySpec
  • Field Details

    • DEFAULT_ROLLUP

      public static final Boolean DEFAULT_ROLLUP
    • DEFAULT_SEGMENT_GRANULARITY

      public static final Granularity DEFAULT_SEGMENT_GRANULARITY
    • DEFAULT_QUERY_GRANULARITY

      public static final Granularity DEFAULT_QUERY_GRANULARITY
    • inputIntervals

      protected final List<org.joda.time.Interval> inputIntervals
    • rollup

      protected final Boolean rollup
  • Constructor Details

    • BaseGranularitySpec

      public BaseGranularitySpec(List<org.joda.time.Interval> inputIntervals, Boolean rollup)
  • Method Details

    • inputIntervals

      public List<org.joda.time.Interval> inputIntervals()
      Description copied from interface: GranularitySpec
      Returns user provided intervals as-is state. used for configuring granular path spec
      Specified by:
      inputIntervals in interface GranularitySpec
      Returns:
    • isRollup

      public boolean isRollup()
      Specified by:
      isRollup in interface GranularitySpec
    • bucketInterval

      public com.google.common.base.Optional<org.joda.time.Interval> bucketInterval(org.joda.time.DateTime dt)
      Description copied from interface: GranularitySpec
      Time-grouping interval corresponding to some instant, if any.
      Specified by:
      bucketInterval in interface GranularitySpec
      Parameters:
      dt - instant to return time interval for
      Returns:
      optional time interval
    • materializedBucketIntervals

      public TreeSet<org.joda.time.Interval> materializedBucketIntervals()
      Description copied from interface: GranularitySpec
      This is a helper method for areas of the code, not in the overlord, were for performance reasons might need the materialized set of bucket intervals
      Specified by:
      materializedBucketIntervals in interface GranularitySpec
      Returns:
      A fast lookup, ordered set, of the materialized bucket interval
    • getLookupTableBuckets

      protected abstract BaseGranularitySpec.LookupIntervalBuckets getLookupTableBuckets()