public class DefaultAggregation extends Object implements Aggregation
Aggregation.| Constructor and Description |
|---|
DefaultAggregation(List<String> aggregateDimensions)
Creates instance of
DefaultAggregation with all tags being optional. |
DefaultAggregation(List<String> aggregateDimensions,
Collection<String> requiredDimensions)
Creates instance of
DefaultAggregation. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(co.cask.cdap.api.dataset.lib.cube.CubeFact fact)
Filters out
CubeFacts which should not be added into this aggregation. |
List<String> |
getDimensionNames()
Defines the dimensions to do the aggregation for.
|
Set<String> |
getRequiredDimensions() |
public DefaultAggregation(List<String> aggregateDimensions)
DefaultAggregation with all tags being optional.aggregateDimensions - tags to be included in aggregation.public DefaultAggregation(List<String> aggregateDimensions, Collection<String> requiredDimensions)
DefaultAggregation.
See also Aggregation.getDimensionNames() for more info on aggregateDimensions.aggregateDimensions - dimensions to be included in aggregation.requiredDimensions - dimensions that must be present in CubeFact
for aggregated value to be stored.public List<String> getDimensionNames()
AggregationCube,
the order of the dimension names can be used as is to form a row key.
That in turn may affect the performance of the querying. Usually you want to put most frequently defined dimensions
(dimensions with values to slice by in CubeQuery to be in front.getDimensionNames in interface Aggregationpublic boolean accept(co.cask.cdap.api.dataset.lib.cube.CubeFact fact)
AggregationCubeFacts which should not be added into this aggregation.accept in interface Aggregationfact - fact to testCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.