Hadoop Source Import Eclipse

Source: Internet
Author: User
Tags git clone

Need to learn more about Hadoop, need to look at the internal source code implementation, so you need to import the Hadoop source into eclipse, a simple summary, the following steps:

First make sure that you have installed Git, Maven3, protobuf2.5, and if you don't need to install it beforehand

1. Download Hadoop source code

git clone git://git.apache.org/hadoop-common.git

2. Enter the Hadoop-common directory and create Eclipse project with Maven

MVN install-dskiptests
MVN eclipse:eclipse-ddownloadsources=true-ddownloadjavadocs=true

3. Import Eclipse

Import Hadoop-common

File->import...->choose "Existing Projects into Workspace" Select Hadoop-common-project directory to import with directory

File->import...->choose "Existing Projects into Workspace" Select Hadoop-assemblies directory to import with directory

Import HDFs

File->import...->choose "Existing Projects into Workspace" Select Hadoop-hdfs-project directory to import with directory

Importing MapReduce

File->import...->choose "Existing Projects into Workspace" Select Hadoop-mapreduce-project directory to import with directory

Import yarn

File->import...->choose "Existing Projects into Workspace" Select Hadoop-yarn-project directory to import with directory

OK, all imported successfully, but there are two places to be aware of:

First, if you want to hadoop-common all compile successfully, you need to set the Hadoop-common Target/generate-test-source/java directory to the source folder

Next, you have to add the Tools.jar of the JDK Lib directory to the Classpath.

Once configured, all code is clearly visible


Related Article

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.