@Experimental public class RemoteClusterTestEnvironment extends Object implements TestEnvironment
Constructor and Description |
---|
RemoteClusterTestEnvironment(String host,
int port,
Configuration config,
String... jarPath)
Construct a test environment for a remote Flink cluster with configurations.
|
RemoteClusterTestEnvironment(String host,
int port,
String... jarPath)
Construct a test environment for a remote Flink cluster.
|
Modifier and Type | Method and Description |
---|---|
StreamExecutionEnvironment |
createExecutionEnvironment()
Create a new
StreamExecutionEnvironment for configuring and executing the Flink job. |
void |
startUp()
Start up the test resource.
|
void |
tearDown()
Tear down the test resource.
|
public RemoteClusterTestEnvironment(String host, int port, String... jarPath)
host
- Hostname of the remote JobManagerport
- REST port of the remote JobManagerjarPath
- Path of JARs to be shipped to Flink clusterpublic RemoteClusterTestEnvironment(String host, int port, Configuration config, String... jarPath)
host
- Hostname of the remote JobManagerport
- REST port of the remote JobManagerconfig
- Configurations of the test environmentjarPath
- Path of JARs to be shipped to Flink clusterpublic StreamExecutionEnvironment createExecutionEnvironment()
TestEnvironment
StreamExecutionEnvironment
for configuring and executing the Flink job.createExecutionEnvironment
in interface TestEnvironment
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
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.