flink集群(standalone模式)简单操作

1、关键配置文件flink-conf.yaml

##配置master节点ip
jobmanager.rpc.address: 192.168.1.100

##配置slave节点可用内存,单位MB
taskmanager.heap.mb: 25600

##配置每个节点的可用slot,1 核CPU对应 1 slot
##the number of available CPUs per machine 
taskmanager.numberOfTaskSlots: 30

##默认并行度 1 slot资源
parallelism.default: 1

2、slave节点配置文件slaves

##每行一个ip
##Each entry must be separated by a new line
192.168.1.110
192.168.1.120

3、启动集群

##在master节点上执行此脚本,就可以启动集群,前提要保证master节点到slaver节点可以免密登录,
##因为它的启动过程是:先在master节点启动jobmanager进程,然后ssh到各slaver节点启动taskmanager进程
./bin/start-cluster.sh

## The script starts a JobManager on the local node and connects via SSH to all worker nodes listed in the slaves file to start the TaskManager on each node

4、停止集群

./bin/stop-cluster.sh

5、单独启动某个节点进程

##登录到对应主机,执行脚本       
./bin/jobmanager.sh start  ##启动jobmanager
./bin/jobmanager.sh stop   ##
./bin/taskmanager.sh start
./bin/taskmanager.sh stop

你可能感兴趣的:(大数据)