Class BaseGranularitySpec
java.lang.Object
org.apache.druid.indexer.granularity.BaseGranularitySpec
- All Implemented Interfaces:
GranularitySpec
- Direct Known Subclasses:
ArbitraryGranularitySpec,UniformGranularitySpec
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classThis is a helper class to facilitate sharing the code for sortedBucketIntervals among the various GranularitySpec implementations. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Granularitystatic final Booleanstatic final Granularityprotected final List<org.joda.time.Interval> protected final Boolean -
Constructor Summary
ConstructorsConstructorDescriptionBaseGranularitySpec(List<org.joda.time.Interval> inputIntervals, Boolean rollup) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.base.Optional<org.joda.time.Interval> bucketInterval(org.joda.time.DateTime dt) Time-grouping interval corresponding to some instant, if any.protected abstract BaseGranularitySpec.LookupIntervalBucketsList<org.joda.time.Interval> Returns user provided intervals as-is state.booleanisRollup()TreeSet<org.joda.time.Interval> 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 intervalsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.indexer.granularity.GranularitySpec
getQueryGranularity, getSegmentGranularity, sortedBucketIntervals, withIntervals
-
Field Details
-
DEFAULT_ROLLUP
-
DEFAULT_SEGMENT_GRANULARITY
-
DEFAULT_QUERY_GRANULARITY
-
inputIntervals
-
rollup
-
-
Constructor Details
-
BaseGranularitySpec
-
-
Method Details
-
inputIntervals
Description copied from interface:GranularitySpecReturns user provided intervals as-is state. used for configuring granular path spec- Specified by:
inputIntervalsin interfaceGranularitySpec- Returns:
-
isRollup
public boolean isRollup()- Specified by:
isRollupin interfaceGranularitySpec
-
bucketInterval
public com.google.common.base.Optional<org.joda.time.Interval> bucketInterval(org.joda.time.DateTime dt) Description copied from interface:GranularitySpecTime-grouping interval corresponding to some instant, if any.- Specified by:
bucketIntervalin interfaceGranularitySpec- Parameters:
dt- instant to return time interval for- Returns:
- optional time interval
-
materializedBucketIntervals
Description copied from interface:GranularitySpecThis 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:
materializedBucketIntervalsin interfaceGranularitySpec- Returns:
- A fast lookup, ordered set, of the materialized bucket interval
-
getLookupTableBuckets
-