httpfs安装指南
httpfs安装指南
安装环境
Linux
maven3
jdk1.6
本地的maven源(有些依赖的jar包Cloudera已不再维护)
- 1.下载httfs源代码包
https://github.com/cloudera/httpfs
使用git下载
git clone https://github.com/cloudera/httpfs.git
- 2.改动pom.xml文件
在<dependencies>中添加依赖
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>${cdh.hadoop.version}</version>
</dependency>
- 3.下载所须要的依赖,
mvn clean:install
当中有些依赖的jar包已不在Cloudera的源上了,须要自己设置maven源,在~/.m2/setting.xml中添加自己的源
- 4.编译打包
mvn package -Pdist
生成的hadoop-hdfs-httpfs-0.20.2-cdh3u6.tar.gz包在target文件夹下
- 5.改动hadoop集群的全部机器的core-site.xml文件
在当中增加下面内容
<property>
<name>hadoop.proxyuser.httpfs.hosts</name>
<value>httpfs-host.foo.com</value>
</property>
<property>
<name>hadoop.proxyuser.httpfs.groups</name>
<value>*</value>
</property>
重新启动hadoop集群
- 6.在要安装httpfs的机器上创建httpfs用户
useradd --create-home --shell /bin/bash httpfs
passwd httpfs
- 7.安装httpfs
将hadoop-hdfs-httpfs-0.20.2-cdh3u6.tar.gz包拷贝到/home/httpfs文件夹下解压
进入到解压出来的文件夹hadoop-hdfs-httpfs-0.20.2-cdh3u6
将现网集群的hadoop配置文件core-site.xml和hdfs-site.xml拷贝到/home/httpfs/hadoop-hdfs-httpfs-0.20.2-cdh3u6/etc/hadoop文件夹下
- 8.改动httpfs-site.xml
在当中增加
<property>
<name>httpfs.proxyuser.httpfs.hosts</name>
<value>*</value>
</property>
<property>
<name>httpfs.proxyuser.httpfs.groups</name>
<value>*</value>
</property>
- 9.启动httpfs
使用httpfs用户启动
/home/httpfs/hadoop-hdfs-httpfs-0.20.2-cdh3u6/sbin/httpfs.sh start
- 10.检查
检查进程是否存在:jps看看有没有Bootstrap进程
查看logs文件夹下httpfs.log和其它log有无异常信息
- 11.curl測试
上传文件
curl -i -X PUT "http://172.16.61.154:14000/webhdfs/v1/tmp/testfile?user.name=bdws&op=create"
依据返回回来的URL再次put
curl -i -X PUT -T test.txt --header "Content-Type: application/octet-stream" "http://172.16.61.154:14000/webhdfs/v1/tmp/testfile?op=CREATE&user.name=bdws&data=true"
下载文件
curl -i "http://172.16.61.154:14000/webhdfs/v1/tmp/testfile?user.name=bdws&op=open"
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: hadoop.auth="u=bdws&p=bdws&t=simple&e=1400181237161&s=F5K1C44TbM/tMjbdFUpM+zExtso="; Version=1; Path=/
Content-Type: application/octet-stream
Content-Length: 20
Date: Thu, 15 May 2014 09:13:57 GMT
this is a test file
- 12.參考:
Hadoop HDFS over HTTP 0.20.2-cdh3u6 - Server Setup
http://cloudera.github.io/httpfs/ServerSetup.html
WebHDFS说明,非常具体包含命令的使用
http://zhangjie.me/webhdfs/
Apache hadoop webhdfs api文档
http://hadoop.apache.org/docs/r1.0.4/webhdfs.html
httpfs安装指南的更多相关文章
- nGrinder安装指南
NGrinder 由两个模块组成,其运行环境为 Oracle JDK 1.6 nGrinder controller web 应用程序,部署在Tomcat 6.x 或更高的版本 nGrinder A ...
- postgresql pgsql最新版安装指南及数据存储路径更改及主从配置
postgresql pgsql最新版安装指南及数据存储路径更改及主从配置 安装指南 首先在apt的list添加你当前系统版本对应的apt列表 目前官网有16.04,14.04,12.04 分别对应下 ...
- 全新 Mac 安装指南(编程篇)(环境变量、Shell 终端、SSH 远程连接)
注:本文专门用于指导对计算机编程与设计(尤其是互联网产品开发与设计)感兴趣的 Mac 新用户,如何在 Mac OS X 系统上配置开发与上网环境,另有<全新 Mac 安装指南(通用篇)>作 ...
- 全新 Mac 安装指南(通用篇)(推荐设置、软件安装、推荐软件)
注:本文将会不定期维护与更新,有需要的朋友请在 Github 上订阅该条 Issues:<全新 Mac 安装指南(通用篇)>. 在 Mac 电脑上只用 Windows 操作系统的同学请看到 ...
- ArchLinux安装指南
将ArchLinux作为进阶Linux发行版,主要看重滚动更新和深入理解Linux的安装过程. 由于是新手,所以先选择在公司电脑上用VMware来安装.然后渐进到借助U盘在win10笔记本上安装双系统 ...
- Linux环境中Openfire安装指南
Linux环境中Openfire安装指南 安装环境: 安装软件:Openfire 4_1_0 http://download.igniterealtime.org/openfire/openfire_ ...
- scrapy3_ 安装指南
安装指南 安装Scrapy 注解 请先阅读 平台安装指南. 下列的安装步骤假定您已经安装好下列程序: Python 2.7 Python Package: pip and setuptools. 现在 ...
- storm 原理简介及单机版安装指南——详细版【转】
storm 原理简介及单机版安装指南 本文翻译自: https://github.com/nathanmarz/storm/wiki/Tutorial 原文链接自:http://www.open-op ...
- mac osx 系统 brew install hadoop 安装指南
mac osx 系统 brew install hadoop 安装指南 brew install hadoop 配置 core-site.xml:配置hdfs文件地址(记得chmod 对应文件夹 ...
随机推荐
- linux环境手动编译安装Nginx实践过程 附异常解决
1.下载nginx源码包并解压 可在http://nginx.org/en/download.html下载.tar.gz的源码包,如(nginx-1.4.7.tar.gz) 或者使用云盘下载 ht ...
- linux-cp
cp 更改时间: 2017-10-26 - 21:00:54 cp:用来复制文件或者目录的命令,当源文件与目标文件名字相同的时候,当cp 没有参数,源文件会覆盖目标文件 参数 -p:保留源文件或者目录 ...
- Cisco VPN Client Win10无法使用的解决办法
http://files.cnblogs.com/files/Flyear/VPN_Win10_ByDuke.zip 1. 关闭系统所有窗口,控制面板一定要关闭. 2. 运行winfix.exe, 按 ...
- 阿里云centos 搭建SVN
1. 安装 先进入想安装的目录,执行 yum install subversion 2. 创建SVN目录 mkdir -p /var/svn/svnrepos ,然后创建版本库 svnadmin c ...
- (原创)遗传算法C++实现
本文没有对遗传算法的原理做过多的解释 基础知识可以参考下面的博客:http://blog.csdn.net/u010451580/article/details/51178225 本实验用到的变异用到 ...
- Thrift全面介绍
官网:http://thrift.apache.org 简介 Thrift是一个软件框架,用来进行可扩展且跨语言的服务的开发.它结合了功能强大的软件堆栈和代码生成引擎,以构建在 C++, Java ...
- [转载] epoll详解
转载自http://blog.csdn.net/xiajun07061225/article/details/9250579 什么是epoll epoll是什么?按照man手册的说法:是为处理大批量句 ...
- python 有关datetime时间日期 以及时间戳转换
直接上代码 其中有注释 #coding=utf-8 import time import datetime def yes_time(): #获取当前时间 now_time = datetime.da ...
- 搭建ntp时间服务器 ntp - (Network Time Protocol)
第1章 ntp 1.1 ntp简介 NTP(Network Time Protocol,网络时间协议)是用来使网络中的各个计算机时间同步的一种协议.它的用途是把计算机的时钟同步到世界协调 ...
- Python之print字典
在python 下面一个包含中文字符串的列表(list)或字典,直接使用print会出现以下的结果: >>> adict={'a':'中文'} >>> print ...