@Experimental public class MiniClusterTestEnvironment extends Object implements TestEnvironment, ClusterControllable
| Constructor and Description |
|---|
MiniClusterTestEnvironment() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment |
createExecutionEnvironment()
Create a new
StreamExecutionEnvironment for configuring and executing the Flink job. |
void |
isolateNetwork(org.apache.flink.core.execution.JobClient jobClient,
Runnable afterFailAction) |
void |
startUp()
Start up the test resource.
|
void |
tearDown()
Tear down the test resource.
|
String |
toString() |
void |
triggerJobManagerFailover(org.apache.flink.core.execution.JobClient jobClient,
Runnable afterFailAction) |
void |
triggerTaskManagerFailover(org.apache.flink.core.execution.JobClient jobClient,
Runnable afterFailAction) |
public org.apache.flink.streaming.api.environment.StreamExecutionEnvironment createExecutionEnvironment()
TestEnvironmentStreamExecutionEnvironment for configuring and executing the Flink job.createExecutionEnvironment in interface TestEnvironmentpublic void triggerJobManagerFailover(org.apache.flink.core.execution.JobClient jobClient,
Runnable afterFailAction)
throws ExecutionException,
InterruptedException
triggerJobManagerFailover in interface ClusterControllableExecutionExceptionInterruptedExceptionpublic void triggerTaskManagerFailover(org.apache.flink.core.execution.JobClient jobClient,
Runnable afterFailAction)
throws Exception
triggerTaskManagerFailover in interface ClusterControllableExceptionpublic void isolateNetwork(org.apache.flink.core.execution.JobClient jobClient,
Runnable afterFailAction)
isolateNetwork in interface ClusterControllablepublic void startUp()
throws Exception
TestResourceThe implementation of this method should be idempotent.
startUp in interface TestResourceException - if anything wrong when starting the resourcepublic void tearDown()
TestResourceThe test resource should be able to tear down even without a startup (could be a no-op).
tearDown in interface TestResourceCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.