public abstract class BaseGranularitySpec extends Object implements GranularitySpec
| Modifier and Type | Class and Description |
|---|---|
protected static class |
BaseGranularitySpec.LookupIntervalBuckets
This is a helper class to facilitate sharing the code for sortedBucketIntervals among
the various GranularitySpec implementations.
|
| Modifier and Type | Field and Description |
|---|---|
static Granularity |
DEFAULT_QUERY_GRANULARITY |
static Boolean |
DEFAULT_ROLLUP |
static Granularity |
DEFAULT_SEGMENT_GRANULARITY |
protected List<org.joda.time.Interval> |
inputIntervals |
protected Boolean |
rollup |
| Constructor and Description |
|---|
BaseGranularitySpec(List<org.joda.time.Interval> inputIntervals,
Boolean rollup) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
asMap(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
com.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.LookupIntervalBuckets |
getLookupTableBuckets() |
List<org.joda.time.Interval> |
inputIntervals()
Returns user provided intervals as-is state.
|
boolean |
isRollup() |
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetQueryGranularity, getSegmentGranularity, sortedBucketIntervals, withIntervalspublic static final Boolean DEFAULT_ROLLUP
public static final Granularity DEFAULT_SEGMENT_GRANULARITY
public static final Granularity DEFAULT_QUERY_GRANULARITY
protected final List<org.joda.time.Interval> inputIntervals
protected final Boolean rollup
public List<org.joda.time.Interval> inputIntervals()
GranularitySpecinputIntervals in interface GranularitySpecpublic boolean isRollup()
isRollup in interface GranularitySpecpublic com.google.common.base.Optional<org.joda.time.Interval> bucketInterval(org.joda.time.DateTime dt)
GranularitySpecbucketInterval in interface GranularitySpecdt - instant to return time interval forpublic TreeSet<org.joda.time.Interval> materializedBucketIntervals()
GranularitySpecmaterializedBucketIntervals in interface GranularitySpecprotected abstract BaseGranularitySpec.LookupIntervalBuckets getLookupTableBuckets()
public Map<String,Object> asMap(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
asMap in interface GranularitySpecCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.