一、Spark运行环境
1、local环境
- 不需要其他任何节点资源就可以在本地执行 Spark 代码的环境
(1)解压缩文件
- 将spark-2.1.1-bin-hadoop2.7.tgz 文件上传到Linux解压到指定位置。
[atguigu@master software]$ tar -zxvf spark-2.1.1-bin-hadoop2.7.tgz -C /opt/module/
[atguigu@master software]$ cd /opt/module/
[atguigu@master module]$ mv spark-2.1.1-bin-hadoop2.7 spark
(2)启动Local环境
- 进入解压缩后的路径,执行一下命令
[atguigu@master module]$ cd spark/
[atguigu@master bin]$ cd bin
[atguigu@master bin]$ ./spark-shell
- 启动成功后,可以输入网址进行WebUI监控页面访问
-退出本地模式
:quit
(3)编写集群所有进程查看脚本
- 在家目录下的bin里创建脚本xcall.sh(这里我用的