public static class LateAggregationParams.LateAggregationParamsBuilder extends Object
Constructor and Description |
---|
LateAggregationParamsBuilder() |
Modifier and Type | Method and 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) |
public LateAggregationParams.LateAggregationParamsBuilder step(Long step)
public LateAggregationParams.LateAggregationParamsBuilder interval(Long interval)
public LateAggregationParams.LateAggregationParamsBuilder heartbeat(Long heartbeat)
public LateAggregationParams build()
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.
Copyright © 2021. All rights reserved.