Class ScalingHistoryUtils
- java.lang.Object
-
- org.apache.flink.autoscaler.metrics.ScalingHistoryUtils
-
public class ScalingHistoryUtils extends java.lang.Object
The utils for scaling history.
-
-
Constructor Summary
Constructors Constructor Description ScalingHistoryUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <KEY,Context extends JobAutoScalerContext<KEY>>
voidaddToScalingHistoryAndStore(AutoScalerStateStore<KEY,Context> stateStore, Context context, java.time.Instant now, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,ScalingSummary> summaries)
static <KEY,Context extends JobAutoScalerContext<KEY>>
voidaddToScalingHistoryAndStore(AutoScalerStateStore<KEY,Context> stateStore, Context context, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.SortedMap<java.time.Instant,ScalingSummary>> scalingHistory, java.time.Instant now, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,ScalingSummary> summaries)
static <KEY,Context extends JobAutoScalerContext<KEY>>
java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.SortedMap<java.time.Instant,ScalingSummary>>getTrimmedScalingHistory(AutoScalerStateStore<KEY,Context> autoScalerStateStore, Context context, java.time.Instant now)
static <KEY,Context extends JobAutoScalerContext<KEY>>
ScalingTrackinggetTrimmedScalingTracking(AutoScalerStateStore<KEY,Context> autoScalerStateStore, Context context, java.time.Instant now)
static java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.SortedMap<java.time.Instant,ScalingSummary>>
trimScalingHistory(java.time.Instant now, org.apache.flink.configuration.Configuration conf, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.SortedMap<java.time.Instant,ScalingSummary>> scalingHistory)
static <KEY,Context extends JobAutoScalerContext<KEY>>
voidupdateVertexList(AutoScalerStateStore<KEY,Context> stateStore, Context ctx, java.time.Instant now, java.util.Set<org.apache.flink.runtime.jobgraph.JobVertexID> vertexSet)
-
-
-
Method Detail
-
addToScalingHistoryAndStore
public static <KEY,Context extends JobAutoScalerContext<KEY>> void addToScalingHistoryAndStore(AutoScalerStateStore<KEY,Context> stateStore, Context context, java.time.Instant now, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,ScalingSummary> summaries) throws java.lang.Exception
- Throws:
java.lang.Exception
-
addToScalingHistoryAndStore
public static <KEY,Context extends JobAutoScalerContext<KEY>> void addToScalingHistoryAndStore(AutoScalerStateStore<KEY,Context> stateStore, Context context, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.SortedMap<java.time.Instant,ScalingSummary>> scalingHistory, java.time.Instant now, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,ScalingSummary> summaries) throws java.lang.Exception
- Throws:
java.lang.Exception
-
updateVertexList
public static <KEY,Context extends JobAutoScalerContext<KEY>> void updateVertexList(AutoScalerStateStore<KEY,Context> stateStore, Context ctx, java.time.Instant now, java.util.Set<org.apache.flink.runtime.jobgraph.JobVertexID> vertexSet) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getTrimmedScalingHistory
@Nonnull public static <KEY,Context extends JobAutoScalerContext<KEY>> java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.SortedMap<java.time.Instant,ScalingSummary>> getTrimmedScalingHistory(AutoScalerStateStore<KEY,Context> autoScalerStateStore, Context context, java.time.Instant now) throws java.lang.Exception
- Throws:
java.lang.Exception
-
trimScalingHistory
public static java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.SortedMap<java.time.Instant,ScalingSummary>> trimScalingHistory(java.time.Instant now, org.apache.flink.configuration.Configuration conf, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.SortedMap<java.time.Instant,ScalingSummary>> scalingHistory)
-
getTrimmedScalingTracking
@Nonnull public static <KEY,Context extends JobAutoScalerContext<KEY>> ScalingTracking getTrimmedScalingTracking(AutoScalerStateStore<KEY,Context> autoScalerStateStore, Context context, java.time.Instant now) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-