net.opentsdb.core
public final class TSSubQuery extends Object
TSQuery. 
 
 When the query is processed by the TSD, if the tsuids list has one
 or more timeseries, the metric and tags fields will be 
 ignored and only the tsuids processed.
 
 Note: You do not need to call validateAndSetQuery() directly as
 the TSQuery object will call this for you when the entire set of 
 queries has been compiled.
 Note: If using POJO deserialization, make sure to avoid setting the 
 agg, downsampler and downsample_interval fields.
| Constructor and Description | 
|---|
| TSSubQuery()Default constructor necessary for POJO de/serialization | 
| Modifier and Type | Method and Description | 
|---|---|
| Aggregator | aggregator() | 
| long | downsampleInterval() | 
| Aggregator | downsampler() | 
| String | getAggregator() | 
| String | getDownsample() | 
| String | getMetric() | 
| boolean | getRate() | 
| RateOptions | getRateOptions() | 
| Map<String,String> | getTags() | 
| List<String> | getTsuids() | 
| void | setAggregator(String aggregator) | 
| void | setDownsample(String downsample) | 
| void | setMetric(String metric) | 
| void | setRate(boolean rate) | 
| void | setRateOptions(RateOptions options) | 
| void | setTags(HashMap<String,String> tags) | 
| void | setTsuids(List<String> tsuids) | 
| String | toString() | 
| void | validateAndSetQuery()Runs through query parameters to make sure it's a valid request. | 
public TSSubQuery()
public void validateAndSetQuery()
TSQuery object the sub query is assigned to.IllegalArgumentException - if something is wrong with the querypublic Aggregator aggregator()
public Aggregator downsampler()
public long downsampleInterval()
public String getAggregator()
public String getMetric()
public Map<String,String> getTags()
public String getDownsample()
public boolean getRate()
public RateOptions getRateOptions()
public void setAggregator(String aggregator)
aggregator - the name of an aggregation functionpublic void setMetric(String metric)
metric - the name of a metric to fetchpublic void setTsuids(List<String> tsuids)
tsuids - a list of timeseries UIDs as hex encoded strings to fetchpublic void setTags(HashMap<String,String> tags)
tags - an optional list of tags for specificity or groupingpublic void setDownsample(String downsample)
downsample - the downsampling function to use, e.g. "2h-avg"public void setRate(boolean rate)
rate - whether or not the result should be rate convertedpublic void setRateOptions(RateOptions options)
options - Options to set when calculating rates