public interface DataExpr
Classes in this package are only intended for use internally within spectator. They may change at any time and without notice.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
DataExpr.AggregateFunction
Base type for simple aggregate functions.
|
static interface |
DataExpr.Aggregator
Helper for incrementally computing an aggregate of a set of tag values.
|
static class |
DataExpr.All
Includes all datapoints that match the query expression.
|
static class |
DataExpr.Count
Aggregates all datapoints that match the query to a single datapoint that is the
number of input values.
|
static class |
DataExpr.DropRollup
Rollup inputs by dropping the specified keys.
|
static class |
DataExpr.GroupBy
Compute a set of time series matching the query and grouped by the specified keys.
|
static class |
DataExpr.KeepRollup
Rollup inputs by only keeping the specified keys.
|
static class |
DataExpr.Max
Aggregates all datapoints that match the query to a single datapoint that is the
maximum of the input values.
|
static class |
DataExpr.Min
Aggregates all datapoints that match the query to a single datapoint that is the
minimum of the input values.
|
static class |
DataExpr.Sum
Aggregates all datapoints that match the query to a single datapoint that is the
sum of the input values.
|
| Modifier and Type | Method and Description |
|---|---|
default DataExpr.Aggregator |
aggregator(boolean shouldCheckQuery)
Get an aggregator that can be incrementally fed values.
|
DataExpr.Aggregator |
aggregator(Map<String,String> tags,
boolean shouldCheckQuery)
Get an aggregator that can be incrementally fed values.
|
default Iterable<TagsValuePair> |
eval(Iterable<TagsValuePair> input)
Evaluate the data expression over the input.
|
boolean |
isAccumulating()
Returns true if the aggregation type is accumulating (sum or count).
|
default boolean |
isCount()
Returns true if the aggregation type is count.
|
Query |
query()
Query for selecting the input measurements that should be aggregated.
|
Map<String,String> |
resultTags(Map<String,String> tags)
Get the set of result tags for a particular datapoint.
|
Query query()
boolean isAccumulating()
default boolean isCount()
Map<String,String> resultTags(Map<String,String> tags)
tags - Full set of tags for a datapoint.DataExpr.Aggregator aggregator(Map<String,String> tags, boolean shouldCheckQuery)
eval(Iterable) if
you already have the completed list of values.tags - The set of tags for the final aggregate.shouldCheckQuery - If true, then values will be checked against the query before applying to the
aggregate. Otherwise, it is assumed that the user has already verified that the
datapoint matches before passing it in.default DataExpr.Aggregator aggregator(boolean shouldCheckQuery)
eval(Iterable) if
you already have the completed list of values.shouldCheckQuery - If true, then values will be checked against the query before applying to the
aggregate. Otherwise, it is assumed that the user has already verified that the
datapoint matches before passing it in.default Iterable<TagsValuePair> eval(Iterable<TagsValuePair> input)
input - Set of data values. The data will get filtered based on the query, that does
not need to be done in advance.