spark-master 高可用测试

发布时间:2020-07-29 16:14:22 作者:无锋剑
来源:网络 阅读:471

spark-master 高可用测试:

集群介绍

[spark-m]
172.20.101.157 sparkname=master01 
172.20.101.164 sparkname=master02
172.20.101.165 sparkname=master03 

[spark-s]
172.20.101.160 sparkname=slave01 
172.20.101.166 sparkname=slave02
172.20.101.167 sparkname=slave03 

[zookeeper]
172.20.101.157 myid=1 
172.20.101.164 myid=3 
172.20.101.165 myid=2 

启动第1台master:

[root@kubm-03 ~]# tailf /var/log/spark/spark-root-org.apache.spark.deploy.master.Master-1-kubm-03.out 
.......
19/07/18 11:11:59 INFO ZooKeeperLeaderElectionAgent: We have gained leadership
19/07/18 11:11:59 INFO Master: I have been elected leader! New state: ALIVE

发现第1台未发现其它节点,状态选举为 leader

启动第2台master:

[root@kubm-02 ~]# sh /usr/local/spark-2.4.3-bin-hadoop2.7/sbin/start-master.sh 
.......
19/07/18 11:17:52 INFO ConnectionStateManager: State change: CONNECTED

状态选举为 CONNECTED

启动第2台master:

[root@kubm-01 ~]# sh /usr/local/spark-2.4.3-bin-hadoop2.7/sbin/start-master.sh 
.。。。。
19/07/18 11:15:09 INFO ConnectionStateManager: State change: CONNECTED

状态选举为 CONNECTED

关闭 leader 节点服务

[root@kubm-03 ~]# sh /usr/local/spark-2.4.3-bin-hadoop2.7/sbin/stop-master.sh 

略等待,kubm-01节点选举为新的 leader

[root@kubm-01 ~]# 
19/07/18 11:19:33 INFO ZooKeeperLeaderElectionAgent: We have gained leadership
19/07/18 11:19:33 INFO Master: I have been elected leader! New state: ALIVE
推荐阅读:
  1. interllj IDEA配置spark
  2. JavaScript new对象的四个过程实例浅析

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

spark master 高可用测试

上一篇:jmeter-参数化与断言实战

下一篇:android Adapter笔记

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》