集群执行

    The command line interface lets you submit packaged programs (JARs) to a cluster(or single machine setup).

    Remote Environment

    The remote environment lets you execute Flink Java programs on a clusterdirectly. The remote environment points to the cluster on which you want toexecute the program.

    Example

    The following illustrates the use of the RemoteEnvironment:

    1. public static void main(String[] args) throws Exception {
    2. ExecutionEnvironment env = ExecutionEnvironment
    3. .createRemoteEnvironment("flink-master", 8081, "/home/user/udfs.jar");
    4. data
    5. public boolean filter(String value) {
    6. return value.startsWith("http://");
    7. })
    8. .writeAsText("hdfs://path/to/result");
    9. env.execute();