About self-compiling Hadoop Eclipse plug-ins

Source: Internet
Author: User

Since the development of the Hadoop program under Eclipse requires plug-in support, and there is no plugin in the Hadoop report, so we need to compile ourselves, the following steps

1. Enter the D:\hadoop-1.2.1\src\contrib directory, locate the Build-contrib.xml file, and change the hadoop.root to the Hadoop directory.


<property name= "Hadoop.root" location= "D:\hadoop-1.2.1"/>

Add the following two lines below: The Eclipse installation root directory, and the Hadoop version.

<property name= "Eclipse.home" location= "D:\eclipse"/>
<property name= "version" value= "1.2.1"/>

2. Modify the build.xml file under D:\hadoop-1.2.1\src\contrib\eclipse-plugin (the red part is new)

<target name= "Jar" depends= "compile" unless= "Skip.contrib" >
<mkdir dir= "${build.dir}/lib"/>
<copy file= "${hadoop.root}/hadoop-core-${version}.jar" tofile= "${build.dir}/lib/hadoop-core.jar" verbose= "true "/>
<copy file= "${hadoop.root}/lib/commons-cli-1.2.jar" todir= "${build.dir}/lib" verbose= "true"/>
<copy file= "${hadoop.root}/lib/commons-configuration-1.6.jar" todir= "${build.dir}/lib" verbose= "true"/>
<copy file= "${hadoop.root}/lib/commons-httpclient-3.0.1.jar" todir= "${build.dir}/lib" verbose= "true"/>
<copy file= "${hadoop.root}/lib/commons-lang-2.4.jar" todir= "${build.dir}/lib" verbose= "true"/>
<copy file= "${hadoop.root}/lib/jackson-core-asl-1.8.8.jar" todir= "${build.dir}/lib" verbose= "true"/>
<copy file= "${hadoop.root}/lib/jackson-mapper-asl-1.8.8.jar" todir= "${build.dir}/lib" verbose= "true"/>
<jar
Jarfile= "${build.dir}/hadoop-${name}-${version}.jar"
Manifest= "${root}/meta-inf/manifest. MF ">
<fileset dir= "${build.dir}" includes= "classes/lib/"/>
<fileset dir= "${root}" includes= "Resources/plugin.xml"/>
</jar>
</target>

Find <path id= "classpath" > tag, add below

            

3. Modify the MANIFEST.MF file. Catalog: D:\hadoop-1.2.1\src\contrib\eclipse-plugin\META-INF

Add the following information to the Bundle-classpath column:

bundle-classpath:classes/,

4. Go to Hadoop directory D:\hadoop-1.2.1\src\contrib\eclipse-plugin, compile with ant, and finally in D:\hadoop-1.21\build\contrib\ Eclipse-plugin below to find your plugin, copy the plugin to the Eclipse/plugin directory, restart.








This article is from the "Wandering" blog, please be sure to keep this source http://1161384.blog.51cto.com/1151384/1416507

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.