当前位置:网站首页>Spark cluster deployment (third bullet)
Spark cluster deployment (third bullet)
2022-08-05 08:08:00 【Insufficient hair volume】
目录

spark集群部署
1 修改spark-env.sh配置文件
$ssh master
$cd opt/module/spark/conf
$vi spark-env.sh

步骤1 将指定masterNode configuration parameter comments‘#’,添加SPARK_DAEMON_JAVA_OPTS配置参数
export JAVA_HOME=/opt/module/jdk1.8.0_144
#export SPARK_MASTER_HOST=master
export SPARK_MASTER_PORT=7077
export SPARK_DAEMON_JAVA_OPTS="-Dspark.deploy.recoveryMode=ZOOKEEPER
-Dspark.deploy.zookeeper.url=master:2181,slave1:2181,slave2:2181
-Dspark.deploy.zookeeper.dir=/spark"
(1)spark.deploy.recoveryMode=ZOOKEEPER:设置zookeeperto enable backupmaster模式
(2)spark.deploy.zookeeper.url=master:指定zookeeper的server地址
(3)spark.deploy.zookeeper.dir:The files and directories that hold cluster metadata information

将spark-env.sh分发至slave1和slave2节点上,Ensure that the configuration files are unified
scp spark-env.sh slave1:/opt/module/spark/conf/
scp spark-env.sh slave2:/opt/module/spark/conf/

2 启动spark HA集群
步骤1 启动zookeeper服务,3台Nodes are required
$cd /opt/module/zookeeper/bin
$ zkServer.sh start



问题1 : 启动sparkThe cluster has the following problem


解决:配置问题,自己把spark-env.shThe horizontal bar in the configuration content is empty


$cd opt/software/spark
$sbin/stop-all.sh

After solving the above problems,重新在master节点启动sparkcluster andslave节点单独启动master服务
在masterLaunched separately on the nodespark服务
$/opt/module/spark/sbin/start-all.sh

在slave1Launched separately on the nodeMaster服务
$/opt/module/spark/sbin/start-master.sh

步骤2 访问http://192.168.196.102(slave1):8080,查看备用master节点状态
Status:STANDBY # 说明spark HA配置完成

3.测试spark HA集群,To demonstrate whether to solve the single point of failure problem,关闭master节点的master进程
$ /opt/module/spark/sbin/stop-master.sh
边栏推荐
猜你喜欢
随机推荐
【无标题】长期招聘硬件工程师-深圳宝安
写出了一个CPU占用极高的代码后引发的思考
2006年星座运势全解-射手
嵌入式系统:基本定时器
Fiddler工具讲解
[Structure internal power practice] Structure memory alignment (1)
强网杯2022 pwn 赛题解析——house_of_cat
Vulnhub target drone: HA_ NARAK
VXE-Table融合多语言
DNS 查询原理详解
YOLOv3 SPP理论详解(包括CIoU及Focal loss)
软件系统测试和验收测试有什么联系与区别?专业软件测试方案推荐
egg框架中解决跨域的三种方案
php向mysql写入数据失败
高效使用数码相机的诀窍
Qt writes custom controls: one of the text spotlight effects
存储过程编写经验和优化措施
Redis缓存以及存在的问题--缓存穿透、缓存雪崩、缓存击穿及解决方法
高端无主灯设计灯光设计该如何布置射灯灯具?
DataFrame insert row and column at specified position









