spark 集群搭建、独立模式(standalone)

https://yq.aliyun.com/articles/617624

实验目的

1) 熟悉spark集群搭建2) 熟悉standalone运行模式实验原理
spark基于standalone集群搭建,standalone是主从结构,分master,worker;app作业首先,简单说明下Master、Worker、Application三种角色。
1、Application:带有自己需要的mem和cpu资源量,会在master里排队,最后被分发到worker上执行。app的启动是去各个worker遍历,获取可用的cpu,然后去各个worker launch executor。
2、Worker:每台slave起一个(也可以起多个),默认或被设置cpu和mem数,并在内存里做加减维护资源剩余量。Worker同时负责拉起本地的executor backend,即执行进程。
3、Master:接受Worker、app的注册,为app执行资源分配。Master和Worker本质上都是一个带Actor的进程
实验环境jdk1.8+ scala-2.12+spark-2.4.4
所需软件包都在/opt/目录下