CentOS 6.7 上通过ambari 2.2.0 来安装 Hadoop 2.7.1.2.3

参考文档

http://ambari.apache.org/
http://www.cnblogs.com/mephisto/p/4835386.html

注意几个地方:

1. 通过本地存储来安装是非常必要的
2. 需要关闭linux的transparent_hugepage,firewall,selinux
查看transparent_hugepage 状态
cat /sys/kernel/mm/transparent_hugepage/enabled
如果是always madvise [never] 说明关闭。如果是always 说明打开了
3. 主机名最好是 aba.testdomain.cn这种方式
4. 安装ambari的过程中,在注册好主机后,需要仔细查看警告。所有条件需要满足检测。
5. 使用官方的wordcount 程序来进行测试
先查找示例程序所在的jar文件

find / -name hadoop-mapreduce-examples

然后运行示例程序

hadoop jar /usr/hdp/2.3.0.0-2557/hadoop-mapreduce/hadoop-mapreduce-examples-2.7.1.2.3.0.0-2557.jar wordcount /tmp/input/word_test.txt /tmp/output/1007_01

或者通过yarn来运行:

yarn jar /usr/hdp/2.3.0.0-2557/hadoop-mapreduce/hadoop-mapreduce-examples-2.7.1.2.3.0.0-2557.jar wordcount /tmp/input/word_test.txt /tmp/output/1007_01

如果出现如下错误

Permission denied: user=root, access=WRITE, inode=”/user/root/.staging”:hdfs:hdfs:drwxr-xr-x

通过下面2个语句来增加root的home目录

[root@hd001 input]# hadoop fs -mkdir /user/root
[root@hd001 input]# hadoop fs -chown root:root /user/root

6.查看job的运行信息

http://192.168.1.151:19888/jobhistory
192.168.1.151 是指History Server

7. App Timeline Server 无法启动

进入App Timeline Server所在的服务器hd002.testcluster查看log

vim /var/log/hadoop-yarn/yarn/yarn-yarn-timelineserver-hd002.testcluster.log

发现错误 :

Class org.apache.hadoop.yarn.server.timeline.EntityGroupFSTimelineStore not found

解决方案:
https://docs.hortonworks.com/HDPDocuments/Ambari-2.2.0.0/bk_ambari_troubleshooting/content/_resolving_general_problems.html
Update the YARN configuration to use the LevelDB store:

* In Ambari Web, browse to Services > YARN > Configs.
* Filter for the yarn.timeline-service.store-class property and set to org.apache.hadoop.yarn.server.timeline.LeveldbTimelineStore value.
* Save the configuration change and restart YARN.

8.配置Ambari Metrics为分布式模式

默认安装时Ambari Metrics为embedded模式,这样收集的所有数据是存放在Collector节点的本地的,大量的Metrics数据会挤占大量的本地存储空间,改为分布式模式后Metrics数据会放置到HDFS上,所以通常这是安装Ambari后必备一个操作。具体的操作可以参考:

http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.0.0/bk_ambari_reference_guide/content/ams_collector_modes.html

http://blog.csdn.net/bluishglc/article/details/48155265

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值