最新的0.20.1包里面已经没带eclipse的plugin了

之前用0.20.0的pluggin偶尔会出问题

所以想自编译之

http://wiki.apache.org/hadoop/EclipsePlugIn

查阅

To build the Eclipse plug-in, you need the source files and a working Eclipse environment (version 3.3+). When compiling , the Eclipse plug-in will be built if it founds the Eclipse environment path in the property "eclipse.home". The build framework looks for this property in ${-src-root}/src/contrib//build.properties and in $HOME/.build.properties.

A typical $HOME/.build.properties file would contain the following entry: eclipse.home=/path/to/eclipse

Then the plug-in should be built when compiling : clean package (from the ${-src-root} directory), which will produce {-src-root}/build/contrib//-${version}-.jar

To install the generated plug-in in your Eclipse environment, remove first all previous versions of the plug-in from your Eclipse environment and copy the -${version}-.jar file generated as described above in your ${eclipse.home}/plugins/ directory. When you restart Eclipse, the Map/Reduce perspective should be available.

得知 只需要在 .build.properties 添加eclipse的路径 即可,没找到这个.build.properties 只找到了build.properties 添加了eclipse的安装路径

然后在的根目录 clean package 生成 (需要loading一些classpath) 难道不能单独?? 在eclipse-plus下也有  用 compile之  会出现classpath错误生成60多个错误…

所以目前比较奇怪..

 

update:

换了个思路,不跟着那个网站的走 不用那个 clean package的命令

先在根目录下 compile

再到src/contrib//下

compile然后 jar

这个时候会提示

BUILD FAILED
/home//-0.20.1/src/contrib//:69: Warning: Could not find file /home//-0.20.1/build/-${version}-core.jar to copy.

再去src/contrib/ 编辑build-contrib.xml   添加

<property name="version" value="0.20.1"/>

然后保存后

修改之前我习惯性的把-${version}目录改为再改回原来的,即/home/// 改为/home//-0.20.1/

复制根目录下的-0.20.1-core.jar 到build/下

然后再去src/contrib//下  jar 即可/home//-0.20.1/build/contrib//-0.20.1-.jar 生成

下载hadoop-0.20.1-eclipse-plugin.jar

标签:, , , , , , ,

相关日志


相关博文

3 条评论

  1. nice job!!

    回复本留言

  2. 我用的是eclipse3.5,hadoop版本是hadoop-0.20.1,但是很奇怪的eclipse点Run on Hadoop的时候一点反应都没有。在shell下hadoop可以正常运行。希望能解答一下这个问题。个人觉得是hadoop插件的问题,因为点插件选择新建Mapper的时候,自动继承的类已经在hadoop-0.20.1这个版本中废弃掉了。

    回复本留言

    jimey Reply:

    在eclipse本来就不管用的功能。。没办法了。好像旧版eclipse管用

    回复本留言

Post comment

comment has COPYRIGHT too!