Class JdbcAutoScalerEventHandler<KEY,Context extends JobAutoScalerContext<KEY>>
- java.lang.Object
-
- org.apache.flink.autoscaler.jdbc.event.JdbcAutoScalerEventHandler<KEY,Context>
-
- Type Parameters:
KEY
- The job key.Context
- The job autoscaler context.
- All Implemented Interfaces:
AutoScalerEventHandler<KEY,Context>
@Experimental public class JdbcAutoScalerEventHandler<KEY,Context extends JobAutoScalerContext<KEY>> extends java.lang.Object implements AutoScalerEventHandler<KEY,Context>
The event handler which persists its event in JDBC related database.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.autoscaler.event.AutoScalerEventHandler
AutoScalerEventHandler.Type
-
-
Field Summary
-
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 JdbcAutoScalerEventHandler(JdbcEventInteractor jdbcEventInteractor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleEvent(Context 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(Context 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
handleException
-
-
-
-
Constructor Detail
-
JdbcAutoScalerEventHandler
public JdbcAutoScalerEventHandler(JdbcEventInteractor jdbcEventInteractor)
-
-
Method Detail
-
handleEvent
public void handleEvent(Context 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<KEY,Context extends JobAutoScalerContext<KEY>>
interval
- Define the interval to suppress duplicate events. No dedupe if null.
-
handleScalingEvent
public void handleScalingEvent(Context 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<KEY,Context extends JobAutoScalerContext<KEY>>
message
- Message describe the event.interval
- Define the interval to suppress duplicate events.
-
-