Interface AutoScalerStateStore<KEY,Context extends JobAutoScalerContext<KEY>>
-
- Type Parameters:
KEY
- The job key.Context
- Instance of JobAutoScalerContext.
- All Known Implementing Classes:
InMemoryAutoScalerStateStore
,JdbcAutoScalerStateStore
,KubernetesAutoScalerStateStore
@Experimental public interface AutoScalerStateStore<KEY,Context extends JobAutoScalerContext<KEY>>
The state store is responsible for storing all state during scaling.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearAll(Context jobContext)
Removes all data from this context.void
flush(Context jobContext)
Flushing is needed because we do not persist data for all store methods until this method is called.java.util.SortedMap<java.time.Instant,CollectedMetrics>
getCollectedMetrics(Context jobContext)
ConfigChanges
getConfigChanges(Context jobContext)
DelayedScaleDown
getDelayedScaleDown(Context jobContext)
java.util.Map<java.lang.String,java.lang.String>
getParallelismOverrides(Context jobContext)
java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.SortedMap<java.time.Instant,ScalingSummary>>
getScalingHistory(Context jobContext)
ScalingTracking
getScalingTracking(Context jobContext)
void
removeCollectedMetrics(Context jobContext)
void
removeConfigChanges(Context jobContext)
void
removeInfoFromCache(KEY jobKey)
Clean up all information related to the current job.void
removeParallelismOverrides(Context jobContext)
void
removeScalingHistory(Context jobContext)
void
storeCollectedMetrics(Context jobContext, java.util.SortedMap<java.time.Instant,CollectedMetrics> metrics)
void
storeConfigChanges(Context jobContext, ConfigChanges configChanges)
void
storeDelayedScaleDown(Context jobContext, DelayedScaleDown delayedScaleDown)
void
storeParallelismOverrides(Context jobContext, java.util.Map<java.lang.String,java.lang.String> parallelismOverrides)
void
storeScalingHistory(Context jobContext, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.SortedMap<java.time.Instant,ScalingSummary>> scalingHistory)
void
storeScalingTracking(Context jobContext, ScalingTracking scalingTrack)
-
-
-
Method Detail
-
storeScalingHistory
void storeScalingHistory(Context jobContext, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.SortedMap<java.time.Instant,ScalingSummary>> scalingHistory) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getScalingHistory
@Nonnull java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.SortedMap<java.time.Instant,ScalingSummary>> getScalingHistory(Context jobContext) throws java.lang.Exception
- Throws:
java.lang.Exception
-
storeScalingTracking
void storeScalingTracking(Context jobContext, ScalingTracking scalingTrack) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getScalingTracking
ScalingTracking getScalingTracking(Context jobContext) throws java.lang.Exception
- Throws:
java.lang.Exception
-
removeScalingHistory
void removeScalingHistory(Context jobContext) throws java.lang.Exception
- Throws:
java.lang.Exception
-
storeCollectedMetrics
void storeCollectedMetrics(Context jobContext, java.util.SortedMap<java.time.Instant,CollectedMetrics> metrics) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getCollectedMetrics
@Nonnull java.util.SortedMap<java.time.Instant,CollectedMetrics> getCollectedMetrics(Context jobContext) throws java.lang.Exception
- Throws:
java.lang.Exception
-
removeCollectedMetrics
void removeCollectedMetrics(Context jobContext) throws java.lang.Exception
- Throws:
java.lang.Exception
-
storeParallelismOverrides
void storeParallelismOverrides(Context jobContext, java.util.Map<java.lang.String,java.lang.String> parallelismOverrides) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getParallelismOverrides
@Nonnull java.util.Map<java.lang.String,java.lang.String> getParallelismOverrides(Context jobContext) throws java.lang.Exception
- Throws:
java.lang.Exception
-
removeParallelismOverrides
void removeParallelismOverrides(Context jobContext) throws java.lang.Exception
- Throws:
java.lang.Exception
-
storeConfigChanges
void storeConfigChanges(Context jobContext, ConfigChanges configChanges) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getConfigChanges
@Nonnull ConfigChanges getConfigChanges(Context jobContext) throws java.lang.Exception
- Throws:
java.lang.Exception
-
removeConfigChanges
void removeConfigChanges(Context jobContext) throws java.lang.Exception
- Throws:
java.lang.Exception
-
storeDelayedScaleDown
void storeDelayedScaleDown(Context jobContext, DelayedScaleDown delayedScaleDown) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getDelayedScaleDown
@Nonnull DelayedScaleDown getDelayedScaleDown(Context jobContext) throws java.lang.Exception
- Throws:
java.lang.Exception
-
clearAll
void clearAll(Context jobContext) throws java.lang.Exception
Removes all data from this context. Flush stil needs to be called.- Throws:
java.lang.Exception
-
flush
void flush(Context jobContext) throws java.lang.Exception
Flushing is needed because we do not persist data for all store methods until this method is called. Note: The state store implementation should try to avoid write operations unless data was changed through this interface.- Throws:
java.lang.Exception
-
removeInfoFromCache
void removeInfoFromCache(KEY jobKey)
Clean up all information related to the current job.
-
-