Home > Database > Mysql Tutorial > Hadoop 2.2HA配置问题说明

Hadoop 2.2HA配置问题说明

WBOY
Release: 2016-06-07 15:07:12
Original
1404 people have browsed it

1、启动服务顺序 ##在每个节点上把zookeeper服务启动zkServer.sh start##在某一namenode节点上执行如下命令,创建命名空间hdfs zkfc -formatZK##在每个节点用如下命令启日志程序hadoop-daemon.sh start journalnode##在主namenode节点格式化namenode和journa

1、启动服务顺序

##在每个节点上把zookeeper服务启动
zkServer.sh start
##在某一namenode节点上执行如下命令,创建命名空间
hdfs zkfc -formatZK
##在每个节点用如下命令启日志程序
hadoop-daemon.sh start journalnode
##在主namenode节点格式化namenode和journalnode目录
hadoop namenode -format mycluster
##在主namenode节点启动namenode进程
hadoop-daemon.sh start namenode
##如下命令是把备namenode节点的目录格式化并把元数据从主namenode节点拷贝过来
hdfs namenode -bootstrapStandby
##启动备节点的namenode
hadoop-daemon.sh start namenode
##在两个namenode节点都启动zkfc服务
hadoop-daemon.sh start zkfc
##在所有的datanode节点上启动datanode
hadoop-daemon.sh start datanode
Copy after login

2、当把两个Namenode都处于standby时需要将一个namenode激活

hdfs haadmin -transitionToActive namenode1

3、yarn的UI端口默认为8088

4、当用stop-all.sh不能关掉Hadoop相关进程时,可以到系统根目录(/tmp)找对应的pid文件,然后打开如下文件,看里面的内容与在命令行运行的jps出来的内容是否一致,如果不一直把对应的pid文件里的进程号改成正在运行的进程号,然后再stop-all.sh就可以正常关闭了。

18726 HMaster
29320 JournalNode
18927 QuorumPeerMain
21288 DataNode
21051 NameNode
22221 ResourceManager
23618 Jps
22368 NodeManager
29651 DFSZKFailoverController
23961 GStartKeeper
24283 Bootstrap
Copy after login

 hadoop-root-datanode.pid  hadoop-root-journalnode.pid hadoop-root-namenode.pid ...

[root@S1SF001 tmp]# cat hadoop-root-namenode.pid
21051
Copy after login

错误汇总

1、java.io.IOException: Cannot start an HA namenode with name dirs that need recovery. Dir: Storage Directory /app/hadoop/hdfs/name state: NOT_FORMATTED

当在standby节点启动namenode时报以上错误,解决办法:

(1)执行:hadoop namenode -bootstrapStandby

(2)再次启动standby节点上的Namenode:hadoop-daemon.sh start namenode



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template