@Singleton public class QueryWeightUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
QUERY_WEIGHT_LIMIT_KEY |
Constructor and Description |
---|
QueryWeightUtil()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getQueryWeightThreshold(Granularity granularity)
Get the weight threshold for the granularity.
|
WeightEvaluationQuery |
makeWeightEvaluationQuery(DruidAggregationQuery<?> druidQuery)
Get the weight check query for the given query.
|
boolean |
skipWeightCheckQuery(DruidAggregationQuery<?> query)
Indicate if the weight check query can be skipped based on heuristics.
|
@NotNull public static final String QUERY_WEIGHT_LIMIT_KEY
public long getQueryWeightThreshold(Granularity granularity)
granularity
- Granularity to get the threshold for.public boolean skipWeightCheckQuery(DruidAggregationQuery<?> query)
query
- Query to testpublic WeightEvaluationQuery makeWeightEvaluationQuery(DruidAggregationQuery<?> druidQuery)
druidQuery
- Druid query to convert to a weight check queryCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.