官方文档:https://ci.apache.org/projects/flink/flink-docs-release-1.8/
1.1下载与安装
https://flink.apache.org/downloads.html
https://mirrors.tuna.tsinghua.edu.cn/apache/flink
下载完成后解压,得到目录结构如下:
1.2启动flink
执行./bin/start-cluster.sh启动flink,之前的版本是执行start-local.sh,新版本后执行start-cluster.sh回自动执行本地模式
默认在本机8081端口启动,如果端口占用,修改conf/flink-conf.yaml中的rest.port 参数即可
UI页面如下:
查看log:
1.3运行demo
batch:
./bin/flink run examples/batch/WordCount.jar
streaming:
./bin/flink run examples/streaming/WordCount.jar --output ./wc.txt