hadoop-2.4.1集群搭建及验证

      关于如何搭建hadoop-2.4.1集群大家可以到:http://download.csdn.net/detail/u012453843/9662855这个地址下载集群搭建文档,文档里有详细的搭建步骤,如果还有疑问,大家可以参考我写过的一篇搭建hadoop-2.2.0集群的博客,博客地址是:http://blog.csdn.net/u012453843/article/details/52829830
      搭建hadoop-2.4.1,我们一般是在64位的虚拟机上安装,因此我们也就需要有64位的开发包,64位的开发包大家可以到:http://download.csdn.net/detail/u012453843/9687046这个 地址下载。
      搭建好hadoop-2.4.1之后,关于HDFS的高可靠性大家可以参考:http://blog.csdn.net/u012453843/article/details/52927997这篇博客进行验证。
      我这里要说的是如何验证Yarn的高可靠性,我们在itcast03和itcast04上配置了Yarn,按照文档的操作步骤,我们先开启了itcast03上的yarn进程,现在我们再启动itcast04上的进程
[root@itcast04 hadoop-2.4.1]# sbin/start-yarn.sh
starting yarn daemons
starting resourcemanager, logging to /itcast/hadoop-2.4.1/logs/yarn-root-resourcemanager-itcast04.out
itcast06: nodemanager running as process 2919. Stop it first.
itcast07: nodemanager running as process 2931. Stop it first.
itcast05: nodemanager running as process 2896. Stop it first.
[root@itcast04 hadoop-2.4.1]# jps
2823 Jps
2742 ResourceManager
[root@itcast04 hadoop-2.4.1]#
       启动完itcast04上的yarn之后,我们来访问以下itcast03的Yarn管理界面,yarn的管理接口是8088,我们在地址栏输入:itcast03:8080,回车,如下图所示
        那么itcastt04的Yarn管理界面是什么样子的呢?我们访问:itcast04:8088,如下图所示,可以看到,itcast04当前处于standby状态,系统自动重定向到了itcast03的yarn管理界面。
         那么我们怎么验证高可靠性呢?我们把itcast03上的ResourceManager进程先强制杀掉,然后看看itcast04的yarn管理界面是否能成为激活状态
[root@itcast03 hadoop-2.4.1]# jps
3355 Jps
2697 ResourceManager
[root@itcast03 hadoop-2.4.1]# kill -9 2697
       杀掉itcast03上的ResourceManager进程之后,我们先来看看itcast03上的Yarn管理界面还能不能访问,结果发现已经无法访问,如下图所示。
        既然itcast03上的yarn已经无法访问,那么集群会不会自动把itcast04上的ResourceManager进程转换成激活状态呢,如下图所示,发现itcast04现在已经成了激活状态。说明zookeeper确实帮我们自动将standby状态的yarn转换成了激活状态。
        那么,如果我此时再启动itcast03上的ResourceManager进程会出现什么现象呢?我们启动itcast03上的yarn
[root@itcast03 sbin]# ./start-yarn.sh
starting yarn daemons
starting resourcemanager, logging to /itcast/hadoop-2.4.1/logs/yarn-root-resourcemanager-itcast03.out
itcast05: nodemanager running as process 2896. Stop it first.
itcast07: nodemanager running as process 2931. Stop it first.
itcast06: nodemanager running as process 2919. Stop it first.
[root@itcast03 sbin]# jps
3627 Jps
3546 ResourceManager
[root@itcast03 sbin]#
      启动完itcast03上的yarn之后,我们来看看itcast03的yarn管理界面,如下图所示,发现现在itcat03自动成了备份状态的yarn,系统重定向到itcast04的yarn管理界面中去。这说明我们的hadoop-2.4.1集群搭建的完全没有问题,大功告成!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值