Class KubernetesAutoScalerEventHandler
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.autoscaler.KubernetesAutoScalerEventHandler
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,AutoScalerEventHandler<io.javaoperatorsdk.operator.processing.event.ResourceID,KubernetesJobAutoScalerContext>
public class KubernetesAutoScalerEventHandler extends java.lang.Object implements AutoScalerEventHandler<io.javaoperatorsdk.operator.processing.event.ResourceID,KubernetesJobAutoScalerContext>
An event handler which posts events to the Kubernetes events API.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.autoscaler.event.AutoScalerEventHandler
AutoScalerEventHandler.Type
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PARALLELISM_MAP_KEY
-
Fields inherited from interface org.apache.flink.autoscaler.event.AutoScalerEventHandler
SCALING_EXECUTION_DISABLED_REASON, SCALING_REPORT_KEY, SCALING_REPORT_REASON, SCALING_SUMMARY_ENTRY, SCALING_SUMMARY_HEADER_SCALING_EXECUTION_DISABLED, SCALING_SUMMARY_HEADER_SCALING_EXECUTION_ENABLED
-
-
Constructor Summary
Constructors Constructor Description KubernetesAutoScalerEventHandler(EventRecorder eventRecorder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleEvent(KubernetesJobAutoScalerContext context, AutoScalerEventHandler.Type type, java.lang.String reason, java.lang.String message, java.lang.String messageKey, java.time.Duration interval)
Handle the event.void
handleScalingEvent(KubernetesJobAutoScalerContext context, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,ScalingSummary> scalingSummaries, java.lang.String message, java.time.Duration interval)
Handle scaling reports.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.autoscaler.event.AutoScalerEventHandler
close, handleException
-
-
-
-
Field Detail
-
PARALLELISM_MAP_KEY
public static final java.lang.String PARALLELISM_MAP_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KubernetesAutoScalerEventHandler
public KubernetesAutoScalerEventHandler(EventRecorder eventRecorder)
-
-
Method Detail
-
handleEvent
public void handleEvent(KubernetesJobAutoScalerContext context, AutoScalerEventHandler.Type type, java.lang.String reason, java.lang.String message, @Nullable java.lang.String messageKey, @Nullable java.time.Duration interval)
Description copied from interface:AutoScalerEventHandler
Handle the event.- Specified by:
handleEvent
in interfaceAutoScalerEventHandler<io.javaoperatorsdk.operator.processing.event.ResourceID,KubernetesJobAutoScalerContext>
interval
- Define the interval to suppress duplicate events. No dedupe if null.
-
handleScalingEvent
public void handleScalingEvent(KubernetesJobAutoScalerContext context, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,ScalingSummary> scalingSummaries, java.lang.String message, java.time.Duration interval)
Description copied from interface:AutoScalerEventHandler
Handle scaling reports.- Specified by:
handleScalingEvent
in interfaceAutoScalerEventHandler<io.javaoperatorsdk.operator.processing.event.ResourceID,KubernetesJobAutoScalerContext>
message
- Message describe the event.interval
- Define the interval to suppress duplicate events.
-
-