@Public public class RemoteStreamEnvironment extends StreamExecutionEnvironment
StreamExecutionEnvironment
for executing on a cluster.cacheFile, DEFAULT_JOB_NAME, isChainingEnabled, transformations
Constructor and Description |
---|
RemoteStreamEnvironment(String host,
int port,
org.apache.flink.configuration.Configuration clientConfiguration,
String... jarFiles)
Creates a new RemoteStreamEnvironment that points to the master
(JobManager) described by the given host name and port.
|
RemoteStreamEnvironment(String host,
int port,
org.apache.flink.configuration.Configuration clientConfiguration,
String[] jarFiles,
URL[] globalClasspaths)
Creates a new RemoteStreamEnvironment that points to the master
(JobManager) described by the given host name and port.
|
RemoteStreamEnvironment(String host,
int port,
String... jarFiles)
Creates a new RemoteStreamEnvironment that points to the master
(JobManager) described by the given host name and port.
|
Modifier and Type | Method and Description |
---|---|
org.apache.flink.api.common.JobExecutionResult |
execute(String jobName)
Triggers the program execution.
|
protected org.apache.flink.api.common.JobExecutionResult |
executeRemotely(StreamGraph streamGraph,
List<URL> jarFiles)
Executes the remote job.
|
org.apache.flink.configuration.Configuration |
getClientConfiguration() |
String |
getHost()
Gets the hostname of the master (JobManager), where the
program will be executed.
|
int |
getPort()
Gets the port of the master (JobManager), where the
program will be executed.
|
String |
toString() |
addDefaultKryoSerializer, addDefaultKryoSerializer, addOperator, addSource, addSource, addSource, addSource, clean, createInput, createInput, createLocalEnvironment, createLocalEnvironment, createLocalEnvironment, createLocalEnvironmentWithWebUI, createRemoteEnvironment, createRemoteEnvironment, createRemoteEnvironment, disableOperatorChaining, enableCheckpointing, enableCheckpointing, enableCheckpointing, enableCheckpointing, execute, fromCollection, fromCollection, fromCollection, fromCollection, fromElements, fromElements, fromParallelCollection, fromParallelCollection, generateSequence, getBufferTimeout, getCachedFiles, getCheckpointConfig, getCheckpointingMode, getCheckpointInterval, getConfig, getDefaultLocalParallelism, getExecutionEnvironment, getExecutionPlan, getMaxParallelism, getNumberOfExecutionRetries, getParallelism, getRestartStrategy, getStateBackend, getStreamGraph, getStreamTimeCharacteristic, initializeContextEnvironment, isChainingEnabled, isForceCheckpointing, readFile, readFile, readFile, readFile, readFileStream, readTextFile, readTextFile, registerCachedFile, registerCachedFile, registerType, registerTypeWithKryoSerializer, registerTypeWithKryoSerializer, resetContextEnvironment, setBufferTimeout, setDefaultLocalParallelism, setMaxParallelism, setNumberOfExecutionRetries, setParallelism, setRestartStrategy, setStateBackend, setStateBackend, setStreamTimeCharacteristic, socketTextStream, socketTextStream, socketTextStream, socketTextStream, socketTextStream
public RemoteStreamEnvironment(String host, int port, String... jarFiles)
host
- The host name or address of the master (JobManager), where the
program should be executed.port
- The port of the master (JobManager), where the program should
be executed.jarFiles
- The JAR files with code that needs to be shipped to the
cluster. If the program uses user-defined functions,
user-defined input formats, or any libraries, those must be
provided in the JAR files.public RemoteStreamEnvironment(String host, int port, org.apache.flink.configuration.Configuration clientConfiguration, String... jarFiles)
host
- The host name or address of the master (JobManager), where the
program should be executed.port
- The port of the master (JobManager), where the program should
be executed.clientConfiguration
- The configuration used to parametrize the client that connects to the
remote cluster.jarFiles
- The JAR files with code that needs to be shipped to the
cluster. If the program uses user-defined functions,
user-defined input formats, or any libraries, those must be
provided in the JAR files.public RemoteStreamEnvironment(String host, int port, org.apache.flink.configuration.Configuration clientConfiguration, String[] jarFiles, URL[] globalClasspaths)
host
- The host name or address of the master (JobManager), where the
program should be executed.port
- The port of the master (JobManager), where the program should
be executed.clientConfiguration
- The configuration used to parametrize the client that connects to the
remote cluster.jarFiles
- The JAR files with code that needs to be shipped to the
cluster. If the program uses user-defined functions,
user-defined input formats, or any libraries, those must be
provided in the JAR files.globalClasspaths
- The paths of directories and JAR files that are added to each user code
classloader on all nodes in the cluster. Note that the paths must specify a
protocol (e.g. file://) and be accessible on all nodes (e.g. by means of a NFS share).
The protocol must be supported by the URLClassLoader
.public org.apache.flink.api.common.JobExecutionResult execute(String jobName) throws org.apache.flink.client.program.ProgramInvocationException
StreamExecutionEnvironment
The program execution will be logged and displayed with the provided name
execute
in class StreamExecutionEnvironment
jobName
- Desired name of the joborg.apache.flink.client.program.ProgramInvocationException
protected org.apache.flink.api.common.JobExecutionResult executeRemotely(StreamGraph streamGraph, List<URL> jarFiles) throws org.apache.flink.client.program.ProgramInvocationException
streamGraph
- Stream Graph to executejarFiles
- List of jar file URLs to ship to the clusterorg.apache.flink.client.program.ProgramInvocationException
public String getHost()
public int getPort()
public org.apache.flink.configuration.Configuration getClientConfiguration()
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.