@Experimental public class RemoteClusterTestEnvironment extends Object implements TestEnvironment
| Constructor and Description |
|---|
RemoteClusterTestEnvironment(String host,
int port,
org.apache.flink.configuration.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 |
|---|---|
org.apache.flink.streaming.api.environment.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, org.apache.flink.configuration.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 org.apache.flink.streaming.api.environment.StreamExecutionEnvironment createExecutionEnvironment()
TestEnvironmentStreamExecutionEnvironment for configuring and executing the Flink job.createExecutionEnvironment in interface TestEnvironmentpublic void startUp()
TestResourceThe implementation of this method should be idempotent.
startUp in interface TestResourcepublic 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.