hadoop development environment to build
7 people Bookmark this article 我要收藏 5 months ago
523 reads
1 comments
hadoop development environment set up:
hadoop website:
http://hadoop.apache.org/
http://wiki.apache.org/hadoop/
Reference to this article compiled: http://wiki.apache.org/hadoop/HowToContribute
Development Environment: ubuntu
Need to install: maven, ant, subversion and jdk.
maven requires 3.0 or later Web site http://maven.apache.org/ is now 3.0.3, download compressed unpack, set the PATH.
ant to install: sudo apt-get install on the ant
the subversion: sudo apt-get install on the subversion
Access to source code:
svn checkout http://svn.apache.org/repos/asf/hadoop/common/trunk/ hadoop-trunk
ProtocolBuffers installation:
Version requires more than the Hadoop 0.23 + ProtocolBuffers need to install from source: http://code.google.com/p/protobuf/
Run after the installation is complete
$ Protoc
Missing the input file.
Indicating success.
Environment variable settings:
$ Vim. Bashrc
Q into at the end add:
export JAVA_HOME = / home/root/devel/jdk1.6.0_24
export M2_HOME = / home/root/devel/maven/apache-maven-3.0.3
export PATH = / home/root/devel/maven/apache-maven-3.0.3/bin: $ JAVA_HOME / bin: $ PATH
After the save is complete, enter the command line
$ The source. Bashrc
Changes to take effect.
Test mvn - version java-version command to view environment variables is successful.
Compile, test source code:
After the above steps, the command-line environment.
In the hadoop source in the root directory, execute: mvn compile, you can begin to compile the code, if compiled successfully using eclipse
IDE for code modification, development.
the installation of the eclipse:
Download 3.6 version 3.7 can also
http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/heliossr2
The installation http://subclipse.tigris.org/update_1.6.x plug-ins and
http://download.eclipse.org/technology/m2e/releases/1.0 plug-in
The two plug-ins are installed after the hadoop source code with maven project import.
Package command: mvn install-Pdist-Dtar-DskipTests = true
Generated: hadoop-dist/target/hadoop-0.24.0-SNAPSHOT.tar.gz