安装Hadoop的Eclipse插件 [英] Installing Hadoop's Eclipse Plugin

查看:131
本文介绍了安装Hadoop的Eclipse插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Hadoop Eclipse插件的恶梦。首先,最新的Hadoop版本(即1.1.1)甚至不包括Eclipse插件jar文件。版本1.0.4有插件,但它不起作用。 Hadoop的早期版本如0.22.0有插件,它的工作原理,但是这些版本的Hadoop是旧的,我想要最新版本的工作。那么Hadoop的Eclipse插件是什么呢?为什么最新版本没有插件,或者如果他们这样做,那么插件不起作用?每个人都有这么多的插件问题吗?我应该放弃这个插件吗?



谢谢,
香农

解决方案

我昨天安装了hadoop-1.0.4的eclipse插件,并且测试成功。



插件不工作的原因是jar包丢失了一些库:




  • commons-cli-1.2.jar

  • commons-configuration-1.6。 jar

  • jackson-core-asl-1.8.8.jar

  • jackson-mapper-asl-1.8.8.jar

  • commons-httpclient-3.0.1.jar

  • commons-lang-2.4.jar



你可以将这个jar从 $ {hadoop} / lib $ {jar} / lib ,而不要忘记修改 MANIFEST



为方便起见,我添加了一些代码到 $ {eclipse-plugin-src} /build.xml target jar

 < copy file =$ {hadoop.root} / build / ivy / lib / Hadoop /common/commons-cli-${commons-cli.versio n} .jartodir =$ {build.dir} / libverbose =true/> 
< copy file =$ {hadoop.root} / lib / commons-configuration - $ {commons-configuration.version} .jartodir =$ {build.dir} / libverbose =true />
< copy file =$ {hadoop.root} / lib / commons-httpclient - $ {commons-httpclient.version} .jartodir =$ {build.dir} / libverbose =true />
< copy file =$ {hadoop.root} / lib / commons-lang - $ {commons-lang.version} .jartodir =$ {build.dir} / libverbose =true />
< copy file =$ {hadoop.root} / lib / jackson-core-asl - $ {jackson.version} .jartodir =$ {build.dir} / libverbose =true />
< copy file =$ {hadoop.root} / lib / jackson-mapper-asl - $ {jackson.version} .jartodir =$ {build.dir} / libverbose =true />

并修改 MANIFEST.MF $ {eclipse-plugin -src} / META-INF

  undle-ClassPath:classes /,
lib / hadoop- core.jar,
lib / commons-cli-1.2.jar,
lib / commons-configuration-1.6.jar,
lib / jackson-core-asl-1.8.8.jar,
lib / commons-httpclient-3.0.1.jar,
lib / jackson-mapper-asl-1.8.8.jar,
lib / commons-lang-2.4.jar

重建eclipse插件,HAVE FUN!


I have such a nightmare with the Hadoop's Eclipse plugin. First of all the latest Hadoop version (which is 1.1.1) doesn't even include the Eclipse plugin jar file. version 1.0.4 has the plugin, but it doesn't work. Earlier versions of Hadoop such as 0.22.0 have the plugin and it works, but then these versions of Hadoop are old, and I want to work wit the latest version. So, what is the deal with Eclipse plugin for Hadoop? Why latest versions either don't have the plugin, or if they do, then the plugin doesn't work? Does everyone has so much problem with this plugin? Should I give up on this plugin?

Thanks, Shannon

解决方案

I installed eclipse plugin for hadoop-1.0.4 yesterday with difficulty, and tested it successful.

The reason for plugin not working is that the jar package lost some libs :

  • commons-cli-1.2.jar
  • commons-configuration-1.6.jar
  • jackson-core-asl-1.8.8.jar
  • jackson-mapper-asl-1.8.8.jar
  • commons-httpclient-3.0.1.jar
  • commons-lang-2.4.jar

you could cp this jars from ${hadoop}/lib to ${jar}/lib, and don't forget modifying MANIFEST.

For convenience, I add some code to ${eclipse-plugin-src}/build.xml target jar

<copy file="${hadoop.root}/build/ivy/lib/Hadoop/common/commons-cli-${commons-cli.version}.jar"  todir="${build.dir}/lib" verbose="true"/>
<copy file="${hadoop.root}/lib/commons-configuration-${commons-configuration.version}.jar"  todir="${build.dir}/lib" verbose="true"/>
<copy file="${hadoop.root}/lib/commons-httpclient-${commons-httpclient.version}.jar"  todir="${build.dir}/lib" verbose="true"/>
<copy file="${hadoop.root}/lib/commons-lang-${commons-lang.version}.jar"  todir="${build.dir}/lib" verbose="true"/>
<copy file="${hadoop.root}/lib/jackson-core-asl-${jackson.version}.jar"  todir="${build.dir}/lib" verbose="true"/>
<copy file="${hadoop.root}/lib/jackson-mapper-asl-${jackson.version}.jar"  todir="${build.dir}/lib" verbose="true"/>

and modified MANIFEST.MF in ${eclipse-plugin-src}/META-INF

undle-ClassPath: classes/,
 lib/hadoop-core.jar,
 lib/commons-cli-1.2.jar,
 lib/commons-configuration-1.6.jar,
 lib/jackson-core-asl-1.8.8.jar,
 lib/commons-httpclient-3.0.1.jar,
 lib/jackson-mapper-asl-1.8.8.jar,
 lib/commons-lang-2.4.jar

rebuild eclipse-plugin, and HAVE FUN!

这篇关于安装Hadoop的Eclipse插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆