Flink环境搭建

Flink 是一个以 Java 及 Scala 作为开发语言的开源大数据项目,代码开源在 GitHub 上,并使用 Maven 来编译和构建项目。

运行 Flink有三种环境模式。

包括:单机 Standalone 模式、多机 Standalone 模式和 Yarn 集群模式

安装单机 Standalone 模式

1
2
3
4
5
6
7
# 到解压包目录

cd /data/tools/flink-1.8.2

# 运行

./bin/start-cluster.sh

查看Flink 的 Web 界面。

1. 提交任务

1
2
3
4
# First of all, we use netcat to start local server via
nc -l 9000
# Submit the Flink program:
./bin/flink run examples/streaming/SocketWindowWordCount.jar --port 9000

以上简单的例子实现了 单机Standalone模式的安装个demo运行。

后面学习更深入的一些课题。

Batch Examples(包括WordCount,PageRank)