Hadoop2.5 Eclipse插件制作、连接集群视频、及hadoop-eclipse-plugin-2.5.0插件下载
问题导读1.hadoop-eclipse-plugin源码如何下载?
2.插件编译需要哪些准备?
3.使用什么命令可以编译Eclipse插件?
static/image/hrline/4.gif
Hadoop2.5 Eclipse插件安装视频
http://www.tudou.com/v/cIly1sBjB4Y/&rpid=353735778&resourceId=353735778_04_05_99/v.swf
static/image/hrline/4.gif
制作过程:
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的版本:
Version: 3.9.1.201308190730
Build id: 3.9.0.201308190730
也就是版本
Version: 3.9.1
Eclipse下载地址:链接:http://pan.baidu.com/s/1dDeT6UH 密码:tjdk
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-plugin\src\contrib\eclipse-plugin>ant jar -Dversion=2.5.0 -D
eclipse.home=E:\eclipseIDE -Dhadoop.home=E:\bianyi\hadoop-2.2.0
上面Hadoop home需要说明的是,这里并不是使用的Hadoop2.5.0,经过各种验证,Dhadoop.home如果使用的是Hadoop2.5是非常痛苦的,需要各种修改,而且不一定能改正确。那么为什么Hadoop home是Hadoop2.2版本的也可以连接Hadoop2.5,这个需要了解内部原理了,感兴趣的同学,可以研究下。
编译后插件位置
build/contrib/eclipse-plugin目录下产生一个hadoop-eclipse-plugin-2.5.0.jar文件
下面附上在win7下,Eclipse版本为3.9.1的插件
链接:http://pan.baidu.com/s/1dDkZbWH 密码:**** Hidden Message *****
http://www.aboutyun.com/static/image/hrline/2.gif
然后尝试连接集群:
首先确认集群版本:
1.把插件放入plugins文件夹
然后打开win7下Eclipse,将hadoop-eclipse-plugin-2.5.0.jar插件放到Eclipse安装目录的plugins文件夹下,我这里的路径是E:\eclipseIDE\plugins
其实放到这里面已经完成大部分了。
2.重启Eclipse
通过window-》preference 找到下图所示,选择Hadoop安装目录
3.创建New hadoop location
通过下面操作,单击other
弹出show view对话框,然后单击map/reduce location
看到小象,如下图
右键New hadoop location
4.配置New hadoop location
5.查看效果
配置完毕,查看效果
static/image/hrline/2.gif
问题总结:
插件的制作过程还是比较复杂的,原先使用的是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:
:: problems summary ::
:::: WARNINGS
module not found: org.apache.hadoop#hadoop-mapreduce-cli
ent-jobclient;2.5.0
==== maven2: tried
http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapredu
ce-client-jobclient/2.5.0/hadoop-mapreduce-client-jobclient-2.5.0.pom
-- artifact org.apache.hadoop#hadoop-mapreduce-client-jobclien
t;2.5.0!hadoop-mapreduce-client-jobclient.jar:
http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapredu
ce-client-jobclient/2.5.0/hadoop-mapreduce-client-jobclient-2.5.0.jar
module not found: org.apache.hadoop#hadoop-mapreduce-cli
ent-core;2.5.0
==== maven2: tried
http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapredu
ce-client-core/2.5.0/hadoop-mapreduce-client-core-2.5.0.pom
-- artifact org.apache.hadoop#hadoop-mapreduce-client-core;2.5
.0!hadoop-mapreduce-client-core.jar:
http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapredu
ce-client-core/2.5.0/hadoop-mapreduce-client-core-2.5.0.jar
module not found: org.apache.hadoop#hadoop-mapreduce-cli
ent-common;2.5.0
==== maven2: tried
http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapredu
ce-client-common/2.5.0/hadoop-mapreduce-client-common-2.5.0.pom
-- artifact org.apache.hadoop#hadoop-mapreduce-client-common;2
.5.0!hadoop-mapreduce-client-common.jar:
http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-mapredu
ce-client-common/2.5.0/hadoop-mapreduce-client-common-2.5.0.jar
module not found: org.apache.hadoop#hadoop-hdfs;2.5.0
==== maven2: tried
http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-hdfs/2.
5.0/hadoop-hdfs-2.5.0.pom
-- artifact org.apache.hadoop#hadoop-hdfs;2.5.0!hadoop-hdfs.ja
r:
http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-hdfs/2.
5.0/hadoop-hdfs-2.5.0.jar
module not found: org.apache.hadoop#hadoop-common;2.5.0
==== maven2: tried
http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-common/
2.5.0/hadoop-common-2.5.0.pom
-- artifact org.apache.hadoop#hadoop-common;2.5.0!hadoop-commo
n.jar:
http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-common/
2.5.0/hadoop-common-2.5.0.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.apache.hadoop#hadoop-mapreduce-client-jobclient;2
.5.0: not found
:: org.apache.hadoop#hadoop-mapreduce-client-core;2.5.0:
not found
:: org.apache.hadoop#hadoop-mapreduce-client-common;2.5.
0: not found
:: org.apache.hadoop#hadoop-hdfs;2.5.0: not found
:: org.apache.hadoop#hadoop-common;2.5.0: not found
::::::::::::::::::::::::::::::::::::::::::::::
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
BUILD FAILED
经过多次修改未果,由于Hadoop Eclipse插件源码使用的是Hadoop2.2所以,就尝试用是Hadoop2.2作为Hadoop home,竟然编译成功了。
{:soso_e179:}{:soso_e179:}{:soso_e179:} 求下载,好 东西
谢谢楼主分享。 好难啊,要慢慢消化 值得试一下
很好很好,辛苦啦 希望这个版本的 hadoop插件是稳定的插件 谢谢版主分享 {:soso_e102:}来收货的~