Build hadoop2.2.0/hadoop2.4.0 Source code reading environment on eclipse

Source: Internet
Author: User

1. Install the dependent packages:

Yum Install GCC pkg-config Libssl-dev

2. Install Protobuf 2.5.0,

First go to Google's website to download Protobuf source code, unzip and switch to the root user to execute the following command:

./configure

If an error occurs in the middle, it indicates that some of the packages are dependent and installed.

An error occured because dependency isn't metthe error is cleaned

Once the required dependencies have been installed, execute:

./make. /makeinstall

3. Compiling Hadoop source code

First download the hadoop-2.2.0 source code, unzip.

2.1. Switch to the source code directory and execute:

Install -dhttp.proxyhost=proxy01.cd.intel.com-dhttp.proxyport=911 

The yellow part acts as the setting agent. Because my compilation environment in the company intranet, so need to set up proxy

The following error was found:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1: Testcompile (Default-testcompile) on Project hadoop-auth:compilation failure:compilation Failure:[error]/home/hduser/hadoop-2.2.0-src/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/ authenticatortestcase.java:[ the, One] Error:cannot access Abstractlifecycle[error] classfile  fororg.mortbay.component.AbstractLifeCycle not Found[error]/home/hduser/hadoop-2.2.0-src/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/ authenticatortestcase.java:[ the, in] Error:cannot access Lifecycle[error] classfile  fororg.mortbay.component.LifeCycle not Found[error]/home/hduser/hadoop-2.2.0-src/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/ authenticatortestcase.java:[98,Ten] Error:cannotFindSymbol[error] Symbol:method start () [ERROR] location:variable server of type Server[error]/home/hduser/hadoop-2.2.0-src/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/ authenticatortestcase.java:[104, A] Error:cannotFindSymbol[error]--[Help1]

Need to modify the hadoop-common-project/hadoop-auth/pom.xml below the source code, the yellow part is new

<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<scope>test</scope>
</dependency>
<dependency> <groupId>org.mortbay.jetty</groupId> <artifactid>jetty-util</ artifactid> <scope>test</scope> </dependency>

Re-execute, smooth through

2.2. Build the Eclipse Project environment:

MVN eclipse:eclipse-dskiptests -dhttp.proxyhost=proxy01.cd.intel.com-dhttp.proxyport=911 

2.3. Open Eclipse and import the project under the source code directory.

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.