I have successfully generated a plug-in using this method.
Download hadoop's release,
Download ant
Decompress ant to the hard disk, such as D: \ ant.
Set Environment Variables
Ant_home = D: \ ant
Add % ant_home % \ bin to path.
Decompress hadoop's release.
Enter % hadoop_home % \ SRC \ contrib \
Edit build-contrib.xml
Join
<Property name = "version" value = "1.0.3"/>
<Property name = "Eclipse. Home" location = "D:/soft/eclipse-jee-indigo-SR1-win32/Eclipse"/>
Copy the jar package under % hadoop_home % To the Plugins directory of the eclipse directory, such as hadoop-core-*. jar.
Enter % hadoop_home % \ SRC \ contrib \ eclipse-plugin
Edit build. xml
In
<Path id = "eclipse-SDK-jars">
<Fileset dir = "$ {eclipse. Home}/plugins/">
</Fileset>
</Path>
Join
<Include name = "hadoop *. jar"/>
In the compile module
Deprecation = "$ {javac. deprecation}
Remove.
Open CMD and use ant in % Hadoop_HOME % \ src \ contrib \ eclipse-plugin
Then compile.
- jar:
- [echo] version:1.0.3
- [copy] Copying 1 file to D:\hadoop-1.0.3\build\contrib\eclipse-plugin\lib
- [copy] Copying D:\hadoop-1.0.3\build\ivy\lib\Hadoop\common\commons-cli-1.2.
- jar to D:\hadoop-1.0.3\build\contrib\eclipse-plugin\lib\commons-cli-1.2.jar
- [jar] Building jar: D:\hadoop-1.0.3\build\contrib\eclipse-plugin\hadoop-ec
- lipse-plugin-1.0.3.jar
-
- BUILD SUCCESSFUL
- Total time: 2 seconds
Note: errors may be reported during compilation, mainly due to the copy problem during jar, copy the commons-cli-1.2.jar and to % HADOOP_HOME % \ build \ ivy \ lib \ Hadoop \ common \, copy the hadoop-core-1.0.3.jar to % HADOOP_HOME % \ build.
These directories may not exist. Create one by yourself!
After compilation is successful, the hadoop-eclipse-plugin-1.0.3.jar is generated under % Hadoop_Home % \ build \ contrib \ eclipse-plugin. Copy it to the plugins directory in the eclipse directory. Re-open eclipse
Select window-open perspective-other and you will see
Select Map/Reduce
Select window-show view-other
Select Map/Reduce Locaions
The hadoop plug-in of eclipse is compiled successfully.