Flink安装包下载【flink-1.9.0-bin-scala_2.11.tgz】
略
启动
[hadoop@hadoop flink-1.9.0]$ ./bin/start-cluster.sh
Starting cluster.
Starting standalonesession daemon on host hadoop.
Starting taskexecutor daemon on host hadoop.
启动本地监听模式端口9000
nc -l 9000
启动作业
./bin/flink run examples/streaming/SocketWindowWordCount.jar --port 9000
登录本机8081地址,可以看到已经提交了一个作业正在运行

本地监听模式发送数据
[hadoop@hadoop flink-1.9.0]$ nc -l 9000
a
b b
c c c
a b c
查看输出结果
[hadoop@hadoop log]$ tail -f flink-hadoop-taskexecutor-0-hadoop.out
a : 1
b : 2
c : 3
a : 1
c : 1
b : 1
本文通过Flink 1.9.0演示了Word Count的实现过程,包括安装、启动本地监听模式、作业提交、数据发送及查看输出结果,帮助理解流式数据处理。
946

被折叠的 条评论
为什么被折叠?



