Hadoop2.5 Eclipse插件制作、连接集群、及hadoop eclipse中hadoop插件

问题导读

1.hadoop-eclipse-plugin源码如何下载?

2.插件编译需要哪些准备?

3.使用什么命令可以编译Eclipse插件?



制作过程:

1.首先从git下载源码

下载地址:

https://github.com/winghc/hadoop2x-eclipse-plugin百度网盘下载:

链接:http://pan.baidu.com/s/1o6DMY4U 密码:y95i

下载之后,我们会看到下面文件夹



对于像安装git的用户,可以查看下面帖子

软件版本控制-在Windows中使用Git视频介绍

win7安装 git软件下载以及遇到的问题解决解决方法

2.win7编译

2.1编译准备

win7的编译首先需要安装jdk、ant、Eclipse

同样window也可以进行编译,环境如下图所示这里的

Eclipse的版本:
Hadoop2.5 Eclipse插件制作、连接集群、及hadoop eclipse中hadoop插件

Version: 3.9.1.201308190730

Build id: 3.9.0.201308190730

Eclipse的安装

Eclipse安装很重要,而且版本很重要,最好能版本一致,因为如果你在Linux制作的插件,只能用于Linux,windows插件只能用于windows,具体的Eclipse版本也尽可能一致,否则会遇到各种问题

2.2编译

aboutyun@master:~/hadoop2x-eclipse-plugin/src/contrib/eclipse-plugin$ ant jar -Dversion=2.5.0 -Declipse.home=/usr/eclipse -Dhadoop.home=/usr/hadoop

参数说明:

1.Dversion是你编译的版本,此版本为2.5.0

2.Declipse.home是Eclipse安装目录

3.Dhadoop.home是Hadoop安装目录

执行如下命令:

E:hadoop2x-eclipse-pluginsrccontribeclipse-plugin>ant jar -Dversion=2.5.0 -D

eclipse.home=E:eclipseIDE -Dhadoop.home=E:bianyihadoop-2.2.0

复制代码

上面Hadoop home需要说明的是,这里并不是使用的Hadoop2.5.0,经过各种验证,Dhadoop.home如果使用的是Hadoop2.5是非常痛苦的,需要各种修改,而且不一定能改正确。那么为什么Hadoop home是Hadoop2.2版本的也可以连接Hadoop2.5,这个需要了解内部原理了,感兴趣的同学,可以研究下。

下面附上在win7下,Eclipse版本为3.9.1的插件

链接:http://pan.baidu.com/s/1dDkZbWH 密码:游客,如果您要查看本帖隐藏内容请回复



然后尝试连接集群:

首先确认集群版本:



1.把插件放入plugins文件夹

然后打开win7下Eclipse,将hadoop-eclipse-plugin-2.5.0.jar插件放到Eclipse安装目录的plugins文件夹下,我这里的路径是E:eclipseIDEplugins

其实放到这里面已经完成大部分了。

2.重启Eclipse

通过window-》preference 找到下图所示,选择Hadoop安装目录



3.创建New hadoop location

通过下面操作,单击other



弹出show view对话框,然后单击map/reduce location



看到小象,如下图



右键New hadoop location

4.配置New hadoop location



5.查看效果

配置完毕,查看效果





问题总结:

插件的制作过程还是比较复杂的,原先使用的是Hadoop2.5版本,编译成功了,不能创建New Hadoop location查看log下面问题

java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration

at org.apache.hadoop.eclipse.server.HadoopServer.<init>(HadoopServer.java:224)

at org.apache.hadoop.eclipse.servers.HadoopLocationWizard.<init>(HadoopLocationWizard.java:88)

at org.apache.hadoop.eclipse.actions.NewLocationAction$1.<init>(NewLocationAction.java:41)

at org.apache.hadoop.eclipse.actions.NewLocationAction.run(NewLocationAction.java:40)

at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)

at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)

at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)

at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)

at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)

at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)

at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)

at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)

at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)

at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)

at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)

at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)

at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

复制代码

网上有很多这方面的资料,尝试,但是还是未能解决。

使用Hadoop2.5作为编译目录,遇到下面问题:

ivy-resolve-common:

[ivy:resolve]

[ivy:resolve] :: problems summary ::

[ivy:resolve] :::: WARNINGS

[ivy:resolve] module not found: org.apache.hadoop#hadoop-mapreduce-cli

ent-jobclient;2.5.0

[ivy:resolve] ==== maven2: tried

[ivy:resolve] http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapredu

ce-client-jobclient/2.5.0/hadoop-mapreduce-client-jobclient-2.5.0.pom

[ivy:resolve] -- artifact org.apache.hadoop#hadoop-mapreduce-client-jobclien

t;2.5.0!hadoop-mapreduce-client-jobclient.jar:

[ivy:resolve] http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapredu

ce-client-jobclient/2.5.0/hadoop-mapreduce-client-jobclient-2.5.0.jar

[ivy:resolve] module not found: org.apache.hadoop#hadoop-mapreduce-cli

ent-core;2.5.0

[ivy:resolve] ==== maven2: tried

[ivy:resolve] http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapredu

ce-client-core/2.5.0/hadoop-mapreduce-client-core-2.5.0.pom

[ivy:resolve] -- artifact org.apache.hadoop#hadoop-mapreduce-client-core;2.5

.0!hadoop-mapreduce-client-core.jar:

[ivy:resolve] http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapredu

ce-client-core/2.5.0/hadoop-mapreduce-client-core-2.5.0.jar

[ivy:resolve] module not found: org.apache.hadoop#hadoop-mapreduce-cli

ent-common;2.5.0

[ivy:resolve] ==== maven2: tried

[ivy:resolve] http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapredu

ce-client-common/2.5.0/hadoop-mapreduce-client-common-2.5.0.pom

[ivy:resolve] -- artifact org.apache.hadoop#hadoop-mapreduce-client-common;2

.5.0!hadoop-mapreduce-client-common.jar:

[ivy:resolve] http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapredu

ce-client-common/2.5.0/hadoop-mapreduce-client-common-2.5.0.jar

[ivy:resolve] module not found: org.apache.hadoop#hadoop-hdfs;2.5.0

[ivy:resolve] ==== maven2: tried

[ivy:resolve] http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-hdfs/2.

5.0/hadoop-hdfs-2.5.0.pom

[ivy:resolve] -- artifact org.apache.hadoop#hadoop-hdfs;2.5.0!hadoop-hdfs.ja

r:

[ivy:resolve] http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-hdfs/2.

5.0/hadoop-hdfs-2.5.0.jar

[ivy:resolve] module not found: org.apache.hadoop#hadoop-common;2.5.0

[ivy:resolve] ==== maven2: tried

[ivy:resolve] http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-common/

2.5.0/hadoop-common-2.5.0.pom

[ivy:resolve] -- artifact org.apache.hadoop#hadoop-common;2.5.0!hadoop-commo

n.jar:

[ivy:resolve] http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-common/

2.5.0/hadoop-common-2.5.0.jar

[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::

[ivy:resolve] :: UNRESOLVED DEPENDENCIES ::

[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::

[ivy:resolve] :: org.apache.hadoop#hadoop-mapreduce-client-jobclient;2

.5.0: not found

[ivy:resolve] :: org.apache.hadoop#hadoop-mapreduce-client-core;2.5.0:

not found

[ivy:resolve] :: org.apache.hadoop#hadoop-mapreduce-client-common;2.5.

0: not found

[ivy:resolve] :: org.apache.hadoop#hadoop-hdfs;2.5.0: not found

[ivy:resolve] :: org.apache.hadoop#hadoop-common;2.5.0: not found

[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::

[ivy:resolve]

[ivy:resolve]

[ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

BUILD FAILED

复制代码

经过多次修改未果,由于Hadoop Eclipse插件源码使用的是Hadoop2.2所以,就尝试用是Hadoop2.2作为Hadoop home,竟然编译成功了。

  

爱华网本文地址 » http://www.413yy.cn/a/25101011/55547.html

更多阅读

eclipse中svn插件的安装 eclipse的svn插件安装

eclipse中svn插件的安装——简介Svn(Subversion)是近年来崛起的版本管理工具,在当前的开源项目里(J2EE),几乎95%以上的项目都用到了SVN。Subversion项目的初衷是为了替换当年开源社区最为流行的版本控制软件CVS,在CVS的功能的基础上有很

珠三角地区的产业集群 珠三角产业结构

  广东省是国内最早出现集群经济形式的省份之一,经过20多年的发展,珠三角地区也形成了规模大、层次高、能力强、数量多的制造业产业集群。在发展过程中,许多产业集群突破了原来的行政区划分范围,迅速向周边扩散,形成了带状产业集

物理科技小制作、小发明活动计划 科技制作小发明

物理科技小制作、小发明活动计划一、指导思想:为了进一步搞好《中学物理校本课程开发》小课题,活跃校园文化,培养学生的创新精神和实践能力,我们物理教研组和备课组积极响应学校即将展开的艺术节活动,2013年3月19日组成

声明:《Hadoop2.5 Eclipse插件制作、连接集群、及hadoop eclipse中hadoop插件》为网友三生三世枕上书分享!如侵犯到您的合法权益请联系我们删除