Class LateAggregationParams.LateAggregationParamsBuilder
- java.lang.Object
-
- org.opennms.netmgt.timeseries.sampleread.LateAggregationParams.LateAggregationParamsBuilder
-
- Enclosing class:
- LateAggregationParams
public static class LateAggregationParams.LateAggregationParamsBuilder extends Object
-
-
Constructor Summary
Constructors Constructor Description LateAggregationParamsBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LateAggregationParams
build()
Calculates the parameters to use for late aggregation.LateAggregationParams.LateAggregationParamsBuilder
heartbeat(Long heartbeat)
LateAggregationParams.LateAggregationParamsBuilder
interval(Long interval)
LateAggregationParams.LateAggregationParamsBuilder
step(Long step)
-
-
-
Method Detail
-
step
public LateAggregationParams.LateAggregationParamsBuilder step(Long step)
-
interval
public LateAggregationParams.LateAggregationParamsBuilder interval(Long interval)
-
heartbeat
public LateAggregationParams.LateAggregationParamsBuilder heartbeat(Long heartbeat)
-
build
public LateAggregationParams build()
Calculates the parameters to use for late aggregation.Since we're in the process of transitioning from an RRD-world, most queries won't contain a specified interval or heartbeat. For this reason, we need to derive sensible values that will allow users to visualize the data on the graphs without too many NaNs.
The given step size will be variable based on the time range and the pixel width of the graph, so we need to derive the interval and heartbeat accordingly.
Let S = step, I = interval and H = heartbeat, the constraints are as follows: 0 < S 0 < I 0 < H S = aI for some integer a >= 2 H = bI for some integer b >= 2
While achieving these constraints, we also want to optimize for: min(|S - S*|) where S* is the user supplied step and S is the effective step.
-
-