@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,
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,
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 |
---|---|
JobExecutionResult |
execute(String jobName)
Triggers the program execution.
|
protected JobExecutionResult |
executeRemotely(StreamGraph streamGraph,
List<URL> jarFiles)
Executes the remote job.
|
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, 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, 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 JobExecutionResult execute(String jobName) throws ProgramInvocationException
StreamExecutionEnvironment
The program execution will be logged and displayed with the provided name
execute
in class StreamExecutionEnvironment
jobName
- Desired name of the jobProgramInvocationException
protected JobExecutionResult executeRemotely(StreamGraph streamGraph, List<URL> jarFiles) throws ProgramInvocationException
streamGraph
- Stream Graph to executejarFiles
- List of jar file URLs to ship to the clusterProgramInvocationException
public String getHost()
public int getPort()
public Configuration getClientConfiguration()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.