hadoop2.6.2 eclipse plugin 编译安装

参考了:http://www.tuicool.com/articles/qY7F3q
插件名称:hadoop2x-eclipse-plugin

插件地址: https://github.com/winghc/hadoop2x-eclipse-plugin

1.下载并解压hadoop2.x,下载地址 http://hadoop.apache.org/releases.html#Download (我下载的是编译好的包)

2.下载并解压eclipse(我的是4.5.2版本,其他的版本类似)

3.下载hadoop2x-eclipse-plugin插件并解压自己喜欢的目录,D:\tools\hadoop2x-eclipse-plugin-master\src\contrib\eclipse-plugin为了方便表达,我暂时叫他" H2EP_HOME "

4.插件编译需要ant工具,下载地址 http://ant.apache.org/bindownload.cgi

配置好ANT_HOME环境变量,指向ant解压地址,配置PATH环境变量,增加%ANT_HOME%\bin(linux环境类似)

5.打开命令行工具,进入“H2EP_HOME”目录;

6.执行ant jar -Dversion=2.6.2   -Declipse.home=E:\eclipse-jee-mars-2-win32-x86_64\eclipse -Dhadoop.home=D:\hadoop-2.6.2\hadoop-2.6.2

eclipse.home配置成eclipse安装目录

hadoop.home配置成hadoop的解压目录

将 2.x.x 修改成对应的hadoop的版本号

7.命令行在ivy-resolve-common处卡了(如果不卡,可以跳过)

原因是找不到几个依赖包,那几个依赖包可能是换路径了,其实不需要这几个依赖包也可以

解决方案:

修改"H2EP_HOME"\src\contrib\eclipse-plugin\build.xml

找到:

<target name="compile" depends="init, ivy-retrieve-common" unless="skip.contrib">

去掉depends修改为

<target name="compile" unless="skip.contrib">

8.再次执行第6步的编译命令,会提示copy不到相关jar包的错误,

解决方案:

修改"H2EP_HOME"\ivy\libraries.properties文件,

将报错的jar包版本号跟换成与"HADOOP_HOME"\share\hadoop\common\lib下面jar对应的版本号

在最后一行添加:hadoop.version=2.6.2   (千万后面不要加空格)

9.再次执行第6步的编译命令,执行成功

在"H2EP_HOME"\build\contrib\eclipse-plugin下生成hadoop-eclipse-plugin-2.x.x.jar插件

10.将hadoop-eclipse-plugin-2.x.x.jar放到eclipse的plugins目录下,启动eclipse

11.打开window===>prefernces,找到Hadoop Map/Reduce选项卡

配置hadoop installation directory目录,指向hadoop的安装目录

12.打开window====>show view====>other,找到Map/Reduce Locations,使其显示

13.在Map/Reduce Locations中右键=====>new hadoop locations,按如下编辑即可。     


DFS  master : 的端口为:
/opt/hadoop-2.6.2/etc/hadoop/core-site.xml

  fs.defaultFS
  hdfs://qxy1    ---默认端口为8020  
  The name of the default file system.  A URI whose
  scheme and authority determine the FileSystem implementation.  The
  uri's scheme determines the config property (fs.SCHEME.impl) naming
  the FileSystem implementation class.  The uri's authority is used to
  determine the host, port, etc. for a filesystem.


MR的端口为:

  mapreduce.jobhistory.address
  qxy1:10020
  MapReduce JobHistory Server IPC host:port


USER NAME: hadoop 为hadoop安装的用户。
主机名的IP为namenode的节点IP.           


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22569416/viewspace-2124613/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/22569416/viewspace-2124613/

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值