Hadoop1.2.1 plugin Compilation

Source: Internet
Author: User

Hadoop1.2.1 plugin Compilation

This article describes the compilation steps of Hadoop 1.2.1 plug-in and the configuration of the compiled plug-in.

1. Decompress Haoop 1.2.1source file hadoop-1.2.1.tar.gz to D: \ hadoop-1.2.1

2. Import the project to Eclipse

 

 

3. Copy the build-contrib.xml to the project.

 

 

4. Modify build. xml

 

1). Specify the build-contrib.xml path

<Import file = "./build-contrib.xml"/>

 

 

 

2) Add Hadoop-related packages to classpath.

<! -- Override classpath to include Eclipse SDK jars -->

<Path id = "classpath">

<! -- Pathelement location = "$ {build. classes}"/-->

<! -- Pathelement location = "$ {hadoop. root}/build/classes"/-->

<Pathelement location = "$ {hadoop. root}/hadoop-core-1.2.1.jar"/>

<Pathelement location = "$ {hadoop. root}/lib/*"/>

<Path refid = "eclipse-sdk-jars"/>

</Path>

 

3) copy the relevant package to the project lib directory and package it into the jar file.

<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-lang-2.4.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/jackson-mapper-asl-1.8.8.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/commons-httpclient-3.0.1.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>

 

5. Modify build-contrib.xml

 

1) check whether the hadoop. root attribute value is correct. If yes, you can use the absolute path of the hadoop directory.

<Property name = "hadoop. root" location = "$ {root}/.../"/>

 

2) Add the following attributes:

<Property name = "version" value = "1.2.1"/>

<Property name = "eclipse. home" location = "D:/eclipse"/>

 

6). Copy the exported jar package to the dropins directory under the eclipse installation directory.

 

7. Restart eclipse

 

8. Configure HDFDS

 

Note that window users running eclipse must use the same Hadoop users on Lunix or have access to Hadoop programs.

 

In linux, there is a grid group that can access the hadoop program. It packages two users (grid and chujq)

 

Primary wn must use grid or chujq to access HDFS.

 

 

 

 

 

You may also like the following articles about Hadoop:

Tutorial on standalone/pseudo-distributed installation and configuration of Hadoop2.4.1 under Ubuntu14.04

Install and configure Hadoop2.2.0 on CentOS

Build a Hadoop environment on Ubuntu 13.04

Cluster configuration for Ubuntu 12.10 + Hadoop 1.2.1

Build a Hadoop environment on Ubuntu (standalone mode + pseudo Distribution Mode)

Configuration of Hadoop environment in Ubuntu

Detailed tutorial on creating a Hadoop environment for standalone Edition

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.