Hadoop SRC重新編譯

yezhibin發表於2014-02-01

下載hadoop 2.2 SRC包到Linux平臺,安裝其BUILDING.TXT文件說明要求進行編譯,具體步驟如下:

1、JDK 1.6 +
   export JAVA_HOME=/usr/java/jdk1.6.0_31

2、Maven 3.0 or later
  下載mvn包,解壓到$HOME/mvn目錄下
   $ mvn -version
      Apache Maven 3.1.1
   export M2_HOME=/home/storm/maven

3、Findbugs 1.3.9 (if running findbugs)

4、ProtocolBuffer 2.4.1+ (for MapReduce and HDFS)
 參考http://www.ibm.com/developerworks/cn/linux/l-cn-gpb/介紹
下載地址:http://code.google.com/p/protobuf/downloads/list
安裝:cd /home/storm/protobuf-2.5.0
          ./configure
          ./make
          ./make check
          ./make install

5、CMake 2.6 or newer (if compiling native code)
   下載http://www.cmake.org/cmake/resources/software.html
    cd /home/storm/cmake-2.8.12.1
    ./bootstrap
    make
    make install

HADOOP MVN的主要模組:
  hadoop (主要hadoop專案
     - hadoop-project  :  所有mvn模組的父POM,所有plugins和依賴都定義在這裡
     - hadoop-project-dist (parent POM生成的distributions)
     - hadoop-annotations (生成hadoop doclet用於生成javadoc)
     - hadoop-assemblies (被不同的模組使用的MAVEN assenblies)
     - hadoop-common-project (Hadoop Common)
     - hadoop-hdfs-project (Hadoop HDFS)
     - hadoop-mapreduce-project (Hadoop Mapreduce)
     - hadoop-tools (Hadoop tools 如streaming Discp等)
     - hadoop-dist (Hadoop distribution assembler)

編譯:
  MAVEN_OPTS="-Xms256m -Xmx512m"
  mvn package

   

         
   

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/354732/viewspace-1076764/,如需轉載,請註明出處,否則將追究法律責任。

相關文章