大数据学习第五篇之Hue集成HDFS

5 篇文章 0 订阅
3 篇文章 1 订阅

接上篇我们继续:

一、配置Hue访问HDFS

外部系统访问HDFS只能使用httpfs的方式,不能使用HDFS默认自带的WebHdfs方式,但Ambari安
装的HDFS并没有默认安装hadoop-httpfs,所以这里需要先安装hadoop-httpfs
1. 安装hadoop-httpfs

 yum install hadoop-httpfs
 cd /etc/init.d
 ln -s /usr/hdp/current/hadoop-httpfs/etc/rc.d/init.d/hadoop-httpfs hadoophttpfs

2. 配置hadoop-httpfs

/etc/hadoop-httpfs/conf
touch httpfs-site.xml
touch httpfs-signature.secret

vi httpfs-site.xml

<configuration xmlns:xi="http://www.w3.org/2001/XInclude">
  <property>
     <name>httpfs.proxyuser.hue.hosts</name>
     <value>*</value>
  </property>
  <property>
     <name>httpfs.proxyuser.hue.groups</name>
     <value>*</value>
  </property>
</configuration>

vi httpfs-signature.secret

hadoop httpfs secret

3. 启动hadoop-httpfs

service hadoop-httpfs start
ps -ef | grep httpfs
lsof -i:14000

如果可以看到httpfs的进程且14000端口是开启的,则httpfs启动成功

4. 修改HDFS配置,登录Ambari平台,加入如下红框中的四个值,然后重启HDFS

5. 修改/opt/hue/hue-4.3.0/desktop/conf/hue.ini,找到[[hdfs_clusters]]位置,填写配置信息,如下

[[hdfs_clusters]]
# HA support by using HttpFs
[[[default]]]
# Enter the filesystem uri
fs_defaultfs=hdfs://vsmshdpcluster
# NameNode logical name.
## logical_name=
# Use WebHdfs/HttpFs as the communication mechanism.
# Domain should be the NameNode or HttpFs host.
# Default port is 14000 for HttpFs.
webhdfs_url=http://sosvsmshadoop1.ps.com:14000/webhdfs/v1

6. 重启Hue

End

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值