public abstract class BaseQuery<T> extends Object implements Query<T>
Modifier and Type | Field and Description |
---|---|
static String |
QUERYID |
DATASOURCE_METADATA, GROUP_BY, SEARCH, SEGMENT_METADATA, SELECT, TIME_BOUNDARY, TIMESERIES, TOPN
Constructor and Description |
---|
BaseQuery(DataSource dataSource,
QuerySegmentSpec querySegmentSpec,
Map<String,Object> context) |
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
computeOverridenContext(Map<String,Object> overrides) |
boolean |
equals(Object o) |
Map<String,Object> |
getContext() |
boolean |
getContextBySegment(boolean defaultValue) |
boolean |
getContextFinalize(boolean defaultValue) |
boolean |
getContextPopulateCache(boolean defaultValue) |
int |
getContextPriority(int defaultValue) |
boolean |
getContextUseCache(boolean defaultValue) |
<ContextType> |
getContextValue(String key) |
<ContextType> |
getContextValue(String key,
ContextType defaultValue) |
DataSource |
getDataSource() |
org.joda.time.Duration |
getDuration() |
String |
getId() |
List<org.joda.time.Interval> |
getIntervals() |
QuerySegmentSpec |
getQuerySegmentSpec() |
int |
hashCode() |
com.metamx.common.guava.Sequence<T> |
run(QueryRunner<T> runner,
Map<String,Object> context) |
com.metamx.common.guava.Sequence<T> |
run(QuerySegmentWalker walker,
Map<String,Object> context) |
Query |
withId(String id) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getType, hasFilters, withDataSource, withOverriddenContext, withQuerySegmentSpec
public static final String QUERYID
public BaseQuery(DataSource dataSource, QuerySegmentSpec querySegmentSpec, Map<String,Object> context)
public DataSource getDataSource()
getDataSource
in interface Query<T>
public QuerySegmentSpec getQuerySegmentSpec()
public com.metamx.common.guava.Sequence<T> run(QuerySegmentWalker walker, Map<String,Object> context)
public com.metamx.common.guava.Sequence<T> run(QueryRunner<T> runner, Map<String,Object> context)
public List<org.joda.time.Interval> getIntervals()
getIntervals
in interface Query<T>
public org.joda.time.Duration getDuration()
getDuration
in interface Query<T>
public <ContextType> ContextType getContextValue(String key)
getContextValue
in interface Query<T>
public <ContextType> ContextType getContextValue(String key, ContextType defaultValue)
getContextValue
in interface Query<T>
public int getContextPriority(int defaultValue)
getContextPriority
in interface Query<T>
public boolean getContextBySegment(boolean defaultValue)
getContextBySegment
in interface Query<T>
public boolean getContextPopulateCache(boolean defaultValue)
getContextPopulateCache
in interface Query<T>
public boolean getContextUseCache(boolean defaultValue)
getContextUseCache
in interface Query<T>
public boolean getContextFinalize(boolean defaultValue)
getContextFinalize
in interface Query<T>
protected Map<String,Object> computeOverridenContext(Map<String,Object> overrides)
Copyright © 2011–2015. All rights reserved.