码迷,mamicode.com
首页 > 其他好文 > 详细

Tachyon基本使用07-----Tachyon集群容错2

时间:2014-10-15 16:04:11      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:tachyon   hadoop   spark   

四、配置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.修改node2Tachyon 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

bubuko.com,布布扣 

killnode1master进程,切换时间大概需求20s,再次查看新的Web UIhttp://node2:19999/home

bubuko.com,布布扣

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

标签:tachyon   hadoop   spark   

原文地址:http://ucloud.blog.51cto.com/3869454/1564194

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!