Associating Hadoop Source to eclipse

Source: Internet
Author: User

Associating Hadoop Source to eclipse

ant:http://archive.apache.org/dist/ant/binaries/

Hadoop:http://archive.apache.org/dist/hadoop/core/

All Versions jdk:http://www.oracle.com/technetwork/java/archive-139210.html

eclipse:http://www.eclipse.org/downloads/

Eclipse Downloads This version:

1. Prepare the software and environment:

The following versions of Ant and Hadoop are used in this article:

Eclipse creates a Java project project.

Ant is the build tool that Apache provides to Java developers, it can run under Windows OS and UNIX OS, it's not only open source but also a very useful tool

2. Copy the core, HDFs, and mapred from the Hadoop-1.2.1 src directory to the Eclipse project:

Three files in Hadoop-1.2.1:

The copy below will be error, because there is no guide packet, so will error:

The fault here is normal, if there is no error, then the problem:

3, the Project Guide package:

Guide Package One:

The jar in the hadoop-1.2.1 root directory is directed into:

Guide Pack II:

Copy the jar in the Lib in the hadoop-1.2.1:

Guide Package III:

Put the jar in the hadoop-1.2.1/lib/jsp-2.1 into the bag:

Guide Pack IV:

Take the jar in the apache-ant-1.9.4 Lib, and note that only one package is being directed:

4. Select the JDK version:

If the computer is not installed jdk1.6 It is best to install one so that eclipse is easy to use.

This example uses the Hadoop version is hadoop-1.2.1, so it is best to use jdk1.6, with the jdk1.8 version may be error.

Double-click JRE systemlibrary[javase-1.6]

Select the previously installed jdk1.6 version:

Click Finish to exit.

5, click on the link Source, in turn, Core, HDFs, mapred three folders in the guide:


When the import is complete, click Remove to delete the HADOOP-1.2.1/SRC:


Click OK to complete:

6. Successful operation:

Take a look at a class code:

Associating Hadoop Source to eclipse

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.