Interface GranularitySpec

All Known Implementing Classes:
ArbitraryGranularitySpec, BaseGranularitySpec, UniformGranularitySpec

public interface GranularitySpec
Tells the indexer how to group events based on timestamp. The events may then be further partitioned based on anything, using a ShardSpec.
  • Method Details

    • sortedBucketIntervals

      Iterable<org.joda.time.Interval> sortedBucketIntervals()
      Iterable all time groups, broken up on segment boundaries. Should be sorted by interval start and non-overlapping.
      Returns:
      Iterable of all time groups
    • inputIntervals

      List<org.joda.time.Interval> inputIntervals()
      Returns user provided intervals as-is state. used for configuring granular path spec
      Returns:
    • bucketInterval

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

      TreeSet<org.joda.time.Interval> materializedBucketIntervals()
      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
      Returns:
      A fast lookup, ordered set, of the materialized bucket interval
    • getSegmentGranularity

      Granularity getSegmentGranularity()
    • isRollup

      boolean isRollup()
    • getQueryGranularity

      Granularity getQueryGranularity()
    • withIntervals

      GranularitySpec withIntervals(List<org.joda.time.Interval> inputIntervals)