根据这篇文章:hadoop2.4 ha(双namenode自动故障转移安装)
http://www.aboutyun.com/forum.php?mod=viewthread&tid=8294
依葫芦画瓢安装了Hadoop2.7.2 HA,集群运行正常。
在安装过程中的格式化、启动之类的都没问题,但是当集群停止后再次启动就不需要再format之类的了。
再次启动安装好的集群只需两步:
1.启动所有节点(安装了zookeeper)上的zookeeper:zookeeper/bin/zkServer.sh start
2.在任何一个namenode上启动整个集群: $HADOOP_HOME/sbin/start-all.sh
示例:
hadoop@node1:~/hadoop-2.7.2/sbin$ ./start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
Starting namenodes on [node1 node2]
node2: starting namenode, logging to /home/hadoop/hadoop-2.7.2/logs/hadoop-hadoop-namenode-node2.out
node1: starting namenode, logging to /home/hadoop/hadoop-2.7.2/logs/hadoop-hadoop-namenode-node1.out
node3: starting datanode, logging to /home/hadoop/hadoop-2.7.2/logs/hadoop-hadoop-datanode-node3.out
node4: starting datanode, logging to /home/hadoop/hadoop-2.7.2/logs/hadoop-hadoop-datanode-node4.out
node5: starting datanode, logging to /home/hadoop/hadoop-2.7.2/logs/hadoop-hadoop-datanode-node5.out
Starting journal nodes [node1 node2 node3 node4 node5]
node4: starting journalnode, logging to /home/hadoop/hadoop-2.7.2/logs/hadoop-hadoop-journalnode-node4.out
node1: starting journalnode, logging to /home/hadoop/hadoop-2.7.2/logs/hadoop-hadoop-journalnode-node1.out
node2: starting journalnode, logging to /home/hadoop/hadoop-2.7.2/logs/hadoop-hadoop-journalnode-node2.out
node3: starting journalnode, logging to /home/hadoop/hadoop-2.7.2/logs/hadoop-hadoop-journalnode-node3.out
node5: starting journalnode, logging to /home/hadoop/hadoop-2.7.2/logs/hadoop-hadoop-journalnode-node5.out
Starting ZK Failover Controllers on NN hosts [node1 node2]
node1: starting zkfc, logging to /home/hadoop/hadoop-2.7.2/logs/hadoop-hadoop-zkfc-node1.out
node2: starting zkfc, logging to /home/hadoop/hadoop-2.7.2/logs/hadoop-hadoop-zkfc-node2.out
starting yarn daemons
starting resourcemanager, logging to /home/hadoop/hadoop-2.7.2/logs/yarn-hadoop-resourcemanager-node1.out
node3: starting nodemanager, logging to /home/hadoop/hadoop-2.7.2/logs/yarn-hadoop-nodemanager-node3.out
node5: starting nodemanager, logging to /home/hadoop/hadoop-2.7.2/logs/yarn-hadoop-nodemanager-node5.out
node4: starting nodemanager, logging to /home/hadoop/hadoop-2.7.2/logs/yarn-hadoop-nodemanager-node4.out
hadoop@node1:~/hadoop-2.7.2/sbin$ jps
6513 ResourceManager
6212 JournalNode
6436 DFSZKFailoverController
2998 QuorumPeerMain
5959 NameNode
6618 Jps
hadoop@node1:~/hadoop-2.7.2/sbin$
|