当前位置:网站首页>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
边栏推荐
猜你喜欢
MobileNetV1架构解析
唤醒手腕 - 微信小程序、QQ小程序、抖音小程序学习笔记(更新中)
Redis implements distributed lock-principle-detailed explanation of the problem
Fiddler工具讲解
Adb 授权过程分析
VXE-Table融合多语言
Game Thinking 19: Multi-dimensional calculation related to games: point product, cross product, point-line-surface distance calculation
ps怎么拼图,自学ps软件photoshop2022,PS制作拼图效果
Fiddler tool explanation
双向循环带头链表
随机推荐
Controlling number and letter input in ASP
Mysql 死锁和死锁的解决方案
数据源对象管理Druid和c3p0
Redis实现分布式锁-原理-问题详解
控制器-----controller
TensorFlow installation steps
Stored procedure writing experience and optimization measures
字符串提取 中文、英文、数字
配合屏幕录像专家,又小又清晰!
Ethernet Principle
小本创业者的致胜法宝!
【结构体内功修炼】枚举和联合的奥秘(三)
egg框架
YOLOv3 SPP理论详解(包括CIoU及Focal loss)
星座理想情人
链表专项之环形链表
JVM运行流程,运行时数据区,类加载,垃圾回收,JMM解析
生命的颜色占卜
[NOIP2010 提高组] 机器翻译
数据库——概述