集群执行
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
:
public static void main(String[] args) throws Exception {
ExecutionEnvironment env = ExecutionEnvironment
.createRemoteEnvironment("flink-master", 8081, "/home/user/udfs.jar");
data
public boolean filter(String value) {
return value.startsWith("http://");
})
.writeAsText("hdfs://path/to/result");
env.execute();