PreRequest: Java
wget https://mirror.bit.edu.cn/apache/flink/flink-1.10.0/flink-1.10.0-src.tgz
tar xzf flin-*.tgz
cd flink-1.10.0
./bin/start-cluster.sh
验证:打开页面 localhost:8081
或 查看日志
tail log/flink-*-standlonession-*.log
nc -l 9000
./bin/flink run examples/streaming/SocketWordCount.jar --port 9000
测试
nc -l 9000
hello world flink
flink is the best
hello again
查看输出:
tail -f log/flink-*-taskexecutor-*out
world 1
flink 2
is 1
the 1
best 1
hello 2
again 1
./bin/stop-cluster.sh
参考链接:官网教程
原文:https://www.cnblogs.com/Mr0wang/p/12748346.html