当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
C语言制作-QQ聊天室
唤醒手腕 - 微信小程序、QQ小程序、抖音小程序学习笔记(更新中)
长期招聘嵌入式开发-深圳宝安
Data source object management Druid and c3p0
基于多块信息提取和马氏距离的k近邻故障监测
MVCC of Google's Fragmented Notes (Draft)
剑指Offer面试题解总结1-10
写出了一个CPU占用极高的代码后引发的思考
DataFrame insert row and column at specified position
moment的使用
达梦数据库大表添加字段
SVG星球大战样式Toggle切换开关按钮
JS语法使用
TensorFlow安装步骤
七夕看什么电影好?爬取电影评分并存入csv文件
【每日一题】1403. 非递增顺序的最小子序列
吴恩达深度学习deeplearning.ai——第一门课:神经网络与深度学习——第二节:神经网络基础(下)
二叉树进阶复习1
爬虫之验证码
作为一个男人必须明白的22个道理