Class BaseGranularitySpec

    • Field Detail

      • DEFAULT_ROLLUP

        public static final Boolean DEFAULT_ROLLUP
      • DEFAULT_SEGMENT_GRANULARITY

        public static final org.apache.druid.java.util.common.granularity.Granularity DEFAULT_SEGMENT_GRANULARITY
      • DEFAULT_QUERY_GRANULARITY

        public static final org.apache.druid.java.util.common.granularity.Granularity DEFAULT_QUERY_GRANULARITY
      • inputIntervals

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

        protected final Boolean rollup
    • Constructor Detail

      • BaseGranularitySpec

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

      • 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:
      • 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