public class FlinkContainerTestEnvironment extends Object implements TestEnvironment, ClusterControllable
FlinkContainer
.Constructor and Description |
---|
FlinkContainerTestEnvironment(int numTaskManagers,
int numSlotsPerTaskManager,
String... jarPath) |
Modifier and Type | Method and Description |
---|---|
StreamExecutionEnvironment |
createExecutionEnvironment()
Create a new
StreamExecutionEnvironment for configuring and executing the Flink job. |
protected Configuration |
flinkConfiguration() |
FlinkContainer |
getFlinkContainer()
Get instance of Flink containers for cluster controlling.
|
void |
isolateNetwork(JobClient jobClient,
Runnable afterFailAction) |
void |
startUp()
Start up the test resource.
|
void |
tearDown()
Tear down the test resource.
|
String |
toString() |
void |
triggerJobManagerFailover(JobClient jobClient,
Runnable afterFailAction) |
void |
triggerTaskManagerFailover(JobClient jobClient,
Runnable afterFailAction) |
public FlinkContainerTestEnvironment(int numTaskManagers, int numSlotsPerTaskManager, String... jarPath)
public void startUp()
TestResource
The implementation of this method should be idempotent.
startUp
in interface TestResource
public void tearDown()
TestResource
The test resource should be able to tear down even without a startup (could be a no-op).
tearDown
in interface TestResource
public StreamExecutionEnvironment createExecutionEnvironment()
TestEnvironment
StreamExecutionEnvironment
for configuring and executing the Flink job.createExecutionEnvironment
in interface TestEnvironment
public void triggerJobManagerFailover(JobClient jobClient, Runnable afterFailAction)
triggerJobManagerFailover
in interface ClusterControllable
public void triggerTaskManagerFailover(JobClient jobClient, Runnable afterFailAction) throws Exception
triggerTaskManagerFailover
in interface ClusterControllable
Exception
public void isolateNetwork(JobClient jobClient, Runnable afterFailAction)
isolateNetwork
in interface ClusterControllable
public FlinkContainer getFlinkContainer()
protected Configuration flinkConfiguration()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.