flink部署

安装

官网地址:https://flink.apache.org/downloads.htmlhttps://www.scala-lang.org/download/
下载:举例

FLINK】
Binaries
							Scala 2.11 				Scala 2.12
Apache Flink 1.7.2 only 	Download (asc, sha512) 	Download (asc, sha512)
需针对scala版本下载!
Flink下载后解压即可,master配置完毕,slave节点直接scp同步即可。

【SCALA】
Other ways to install Scala
	Download the Scala binaries for [UNIX](此处翻墙后才可看到UNIX字样,并可点击下载二进制包)
Scala下载后解压,配置环境变量即可,检查是否可用执行命令:scala。

配置

环境变量

[root@config]# vi ~/.bashrc
## FLINK ##
export FLINK_HOME=/usr/local/flink-1.4.2
## SCALA ##
export PATH=/usr/local/scala/bin:$PATH

flink-conf.yaml

jobmanager.rpc.address: test215
jobmanager.rpc.port: 6123
jobmanager.heap.mb: 10240
taskmanager.heap.mb: 10240
taskmanager.numberOfTaskSlots: 32
taskmanager.memory.preallocate: false
parallelism.default: 64
web.port: 8081

masters

10.11.11.215:8081

slaves

# 节点列表

API取消任务

通过接口获取任务id后cancel:
jobid获取:flink list | grep StreamSQLTest | grep RUNNING | awk '{print $4}'
cancal命令:flink cancel $JOB_ID

启动

# ${FLINK_HOME}/bin/start-cluster.sh
# ${FLINK_HOME}/bin/stop-cluster.sh

猜你喜欢

转载自blog.csdn.net/waplys/article/details/89104732