Hadoop,hbase,zookeeper source code compile and import eclipse

Source: Internet
Author: User
Tags zookeeper git clone automake

Basic idea: Refer to the official English document as much as possible

Hadoop:http://wiki.apache.org/hadoop/frontpage

Hbase:http://hbase.apache.org/book.html

Zookeeper:https://cwiki.apache.org/confluence/display/zookeeper/index

Environment Introduction

Ubuntu 14.04LTS, 32 bit

Then follow the Hadoop,hbase,zookeeper order to compile the source code, set up a folder ~/code for storing the source code

Hadoop

First go to Apache Hadoop official website to download the source code, the author downloaded the 2.6.0 version, that is hadoop-2.6.0-src.tar.gz

Then unzip and change the folder name (for convenience ...) )

$ TAR-ZXVF hadoop-2.6. 0-src.tar.gz$ mv Hadoop-2.6. 0 Hadoop

Before compiling, there are a few packages that need to be installed, to view the official Hadoop documentation, the following prerequisites:

1, JDK. Recommended Orcale JDK 7, or the system comes with a openjdk

2, Protocolbuffer 2.5.0, this need to use the source code installation, command has./configur, make && do install. Note Use Protoc--version to view versions

3, Apache maven version 3 or above, using Apt-get install can

4, in order to create native libraries, also need lzo headers,zlib headers, gcc, OpenSSL headers, cmake, Protobuf dev Tools, and Libtool, and the GNU Autotools (Automake, autoconf, etc).

$ apt-Get -y install maven build-essential autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev libfu Se-dev

With the preparation above, you can compile the Hadoop source code and import the eclipse.

First you need to install Hadoop-maven-plugins

$ cd hadoop-maven-plugins$ mvn install

Then go back to Hadoop's extracted source directory and generate the project files required by eclipse.

$ MVN eclipse:eclipse-dskiptests

Finally open eclipse,[file]->[import]->[general]->[existing Projects into Workspace], select the root directory after Hadoop decompression, import

Note that due to Hadoop under the face of the project more, you can choose the project you are interested in import, such as Hadoop-common,hadoop-hdfs,hadoop-yarn-common

HBase

Also hbase must first go to the official download source, the author download is 0.94.11, that is, hbase-0.94.11.tar.gz, unzip and change the folder name

$ tar-zxvf hbase-0.94.  One . tar.gz$ mv HBase-0.94.  One

Refer to the HBase official documentation to enter the HBase directory, build first, and then build the project files required by eclipse

$ mvn Clean Install-

Finally open eclipse,[file]->[import]->[general]->[existing Projects into Workspace], select the root directory after HBase decompression, import

Zookeeper

The author downloaded the version 3.4.6, which is zookeeper-3.4.6.tar.gz, unzip and change the folder name

$ tar-zxvf zookeeper-3.4. 6 . tar.gz$ mv Zookeeper-3.4. 6 Zookeeper

Since zookeeper needs to be compiled with Ant, the project files required for eclipse are generated using the following command after entering the zookeeper directory

$ ant Eclipse

Open eclipse,[file]->[import]->[general]->[existing Projects into Workspace], select the root directory after zookeeper decompression, import

At this point, you can use Eclipse to learn the source of Hadoop,hbase,zookeeper.

It is necessary to note that the author downloads are not the latest version of the various projects, you can use the following command to obtain the source code

$ git clone git://git.apache.org/hadoop.git$ git clone git://Git.apache.org/hbase.git $ git clone git://git.apache.org/zookeeper.git

Hadoop,hbase,zookeeper source code compile and import eclipse

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.