1、flink-1.7.1
编辑start-cluster.bat
set "JAVA_HOME=C:\tools\JDK8"
set "path=%JAVA_HOME%\bin;%PATH%";
set "CLASSPATH=%JAVA_HOME%\lib";
2、创建flink项目
打开cmd黑屏
md project
cd project
mvn archetype:generate -DarchetypeGroupId=org.apache.flink -DarchetypeArtifactId=flink-quickstart-java -DarchetypeVersion=1.7.0
package cn.zsj;
import org.apache.flink.api.common.typeinfo.BasicTypeInfo;
import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.api.java.io.TextInputFormat;
import org.apache.flink.core.fs.Path;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.functions.source.FileProcessingMode;
public class FileStreamingJob {