当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
谷歌零碎笔记之MVCC(草稿)
Insights in programming
【深度学习实践(一)】安装TensorFlow
Adb authorization process analysis
v-if/v-else根据计算判断是否显示
How Entrepreneurs Attract Venture Capitalists
[Untitled] Long-term recruitment of hardware engineers-Shenzhen Baoan
软件系统测试和验收测试有什么联系与区别?专业软件测试方案推荐
Data source object management Druid and c3p0
JVM运行流程,运行时数据区,类加载,垃圾回收,JMM解析
爬虫从入门到入牢
[NOIP2010 提高组] 机器翻译
unity urp 渲染管线顶点偏移的实现
iptables实现网络限制下ntp自定义端口同步时间
达梦数据库大表添加字段
uniapp时间组件封装年-月-日-时-分-秒
Access Denied: "microsoft.web.ui.webcontrols" workaround
v-if/v-else determines whether to display according to the calculation
C语言制作-QQ聊天室
TensorFlow installation steps