Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce, mail # user - How to build Hadoop from source using Ant

Copy link to this message
How to build Hadoop from source using Ant
Jun Li 2013-07-13, 10:37

I have downloaded from the Apache web site the Hadoop.1.1.2, the current
stable version.  Then I simply used the command of:

ant -Dcompile-core=true

to try to build the Hadoop core.

After the successful compilation, I used the diff tool to try to compare
the hardoop-core.jar  that I just built, with the one comes with the
Hadoop-1.1.2 tar.gz from the Apache web site.  I see a lot of class files
are different in my compiled JAR file and the ones from the
hadoop-1.1.2.tar.gz from the Apache Web site.   Then I picked, for example,
the class: org/apache/hadoop/security/UserGroupInformation.class, and used
md5sum to make the comparison, and confirmed that the file content is
really different for two class files.

My java compiler is Sun Java build 1.6.0_45-b06.

I like to know what is the correct command to invoke ANT to compile the
java code from the Hadoop Source code.

Thank you!