首页 > 代码库 > Tachyon基本使用07-----Tachyon集群容错2
Tachyon基本使用07-----Tachyon集群容错2
四、配置Master容错
1.修改Tachyon配置
[root@node1 conf]# pwd /usr/local/tachyon/conf [root@node1 conf]# tailtachyon-env.sh JAVA_HOME=/usr/java/default exportTACHYON_MASTER_ADDRESS=node1 exportTACHYON_UNDERFS_ADDRESS=hdfs://node2:9000 -Dtachyon.master.journal.folder=$TACHYON_UNDERFS_ADDRESS/tachyon/journal -Dtachyon.usezookeeper=true -Dtachyon.zookeeper.address=node1:2181,node2:2181,node3:2181
2.复制配置文件到其它节点
[root@node1 ~]# scp -r /usr/local/tachyon-0.5.0/ node2:/usr/local/ [root@node1 ~]# scp -r /usr/local/tachyon-0.5.0/ node3:/usr/local/
3.修改node2的Tachyon Master地址
[root@node2 conf]# pwd /usr/local/tachyon/conf [root@node2 conf]# cat tachyon-env.sh|grep "export TACHYON_MASTER_ADDRESS" export TACHYON_MASTER_ADDRESS=node2 [root@node2 conf]#
4.配置node2 ssh免密码登录
[root@node2 conf]#ssh-keygen-t rsa -f ~/.ssh/id_rsa -P ‘‘ [root@node2 conf]#ssh-copy-id-i node1 [root@node2 conf]#ssh-copy-id-i node2 [root@node2 conf]#ssh-copy-id-i node3
5.初始化Tachyon
[root@node1 ~]# tachyon format
6.启动tachyon
[root@node1 ~]# tachyon-start.sh all Mount
7.启动第二个Master
[root@node2 ~]#tachyon-start.sh master Starting master @ node2 [root@node2 ~]#
8.查看进程
[root@node1 ~]# jps 9320 DataNode 9500 JournalNode 9047 QuorumPeerMain 18756 TachyonWorker 18640 TachyonMaster 9217 NameNode 9673 DFSZKFailoverController 18974 Jps [root@node1 ~]# ssh node2 jps 12865 TachyonMaster 12801 TachyonWorker 5300 NameNode 5238 QuorumPeerMain 12904 Jps 5580 DFSZKFailoverController 5370 DataNode 5457 JournalNode [root@node1 ~]# ssh node3 jps 4797 JournalNode 4711 DataNode 8304 Jps 8259 TachyonWorker 4648 QuorumPeerMain [root@node1 ~]#
9.测试HA
web界面查看:http://node1:19999
kill掉node1的master进程,切换时间大概需求20s,再次查看新的Web UI:http://node2:19999/home
10.查看zookeeper
[root@node1 ~]# zkCli.sh Connecting to localhost:2181 WatchedEvent state:SyncConnected type:None path:null [zk:localhost:2181(CONNECTED) 0] ls / [election, hadoop-ha,zookeeper, leader] [zk:localhost:2181(CONNECTED) 1] ls /election [_c_ba3d1793-d90a-41ff-96d4-a1d5fca719c2-lock-0000000005, _c_1f2dab80-4bd5-41ab-825f-8e31bdd44f97-lock-0000000004, _c_fd87f94e-91dc-44c0-a388-9a4828e9275d-lock-0000000003] [zk:localhost:2181(CONNECTED) 2] ls /leader [node1:19998,node2:19998] [zk:localhost:2181(CONNECTED) 3]
本文出自 “tachyon” 博客,请务必保留此出处http://ucloud.blog.51cto.com/3869454/1564194
Tachyon基本使用07-----Tachyon集群容错2
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。