Class RemoteStreamEnvironment

    • Constructor Detail

      • RemoteStreamEnvironment

        public 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.
        Parameters:
        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.
      • RemoteStreamEnvironment

        public 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.
        Parameters:
        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.
      • RemoteStreamEnvironment

        public 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.
        Parameters:
        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.
      • RemoteStreamEnvironment

        @PublicEvolving
        public RemoteStreamEnvironment​(String host,
                                       int port,
                                       org.apache.flink.configuration.Configuration clientConfiguration,
                                       String[] jarFiles,
                                       URL[] globalClasspaths,
                                       SavepointRestoreSettings savepointRestoreSettings)
        Creates a new RemoteStreamEnvironment that points to the master (JobManager) described by the given host name and port.
        Parameters:
        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.
        savepointRestoreSettings - Optional savepoint restore settings for job execution.
      • RemoteStreamEnvironment

        @PublicEvolving
        public RemoteStreamEnvironment​(org.apache.flink.core.execution.PipelineExecutorServiceLoader executorServiceLoader,
                                       String host,
                                       int port,
                                       org.apache.flink.configuration.Configuration clientConfiguration,
                                       String[] jarFiles,
                                       URL[] globalClasspaths,
                                       SavepointRestoreSettings savepointRestoreSettings)
    • Method Detail

      • execute

        public org.apache.flink.api.common.JobExecutionResult execute​(StreamGraph streamGraph)
                                                               throws Exception
        Description copied from class: StreamExecutionEnvironment
        Triggers the program execution. The environment will execute all parts of the program that have resulted in a "sink" operation. Sink operations are for example printing results or forwarding them to a message queue.
        Overrides:
        execute in class StreamExecutionEnvironment
        Parameters:
        streamGraph - the stream graph representing the transformations
        Returns:
        The result of the job execution, containing elapsed time and accumulators.
        Throws:
        Exception - which occurs during job execution.
      • getHost

        public String getHost()
        Gets the hostname of the master (JobManager), where the program will be executed.
        Returns:
        The hostname of the master
      • getPort

        public int getPort()
        Gets the port of the master (JobManager), where the program will be executed.
        Returns:
        The port of the master