Interface ClusterControllable
- All Known Implementing Classes:
FlinkContainerTestEnvironment,MiniClusterTestEnvironment
@Experimental
public interface ClusterControllable
Interface for triggering failover in a Flink cluster.
-
Method Summary
Modifier and TypeMethodDescriptionvoidisolateNetwork(org.apache.flink.core.execution.JobClient jobClient, Runnable afterFailAction) Disconnect network between Flink cluster and external system.voidtriggerJobManagerFailover(org.apache.flink.core.execution.JobClient jobClient, Runnable afterFailAction) Triggers a JobManager failover.voidtriggerTaskManagerFailover(org.apache.flink.core.execution.JobClient jobClient, Runnable afterFailAction) Triggers TaskManager failover.
-
Method Details
-
triggerJobManagerFailover
void triggerJobManagerFailover(org.apache.flink.core.execution.JobClient jobClient, Runnable afterFailAction) throws Exception Triggers a JobManager failover.- Parameters:
jobClient- client of the running jobafterFailAction- action to take before restarting the JobManager- Throws:
Exception
-
triggerTaskManagerFailover
void triggerTaskManagerFailover(org.apache.flink.core.execution.JobClient jobClient, Runnable afterFailAction) throws Exception Triggers TaskManager failover.- Parameters:
jobClient- client of the running jobafterFailAction- action to take before restarting TaskManager(s)- Throws:
Exception
-
isolateNetwork
void isolateNetwork(org.apache.flink.core.execution.JobClient jobClient, Runnable afterFailAction) throws Exception Disconnect network between Flink cluster and external system.- Parameters:
jobClient- client of the running jobafterFailAction- action to take before recovering the network connection- Throws:
Exception
-