Why compile on your own hadoop Source code , It's often because of the official hadoop The distribution is based on 32 Bit operating system , In operation hadoop Occurs when warn.
 
Prepare the software :
1)JDK
2)Hadoop Source code
3)Maven
4)Protobuf
 
Compilation summary :
1)JDK install ( A little )
2) Installation required
       sudo yum install -y g++ gcc gcc-c++ autoconf automake libtoolcmake zliblg-dev pkg-conf libssl-dev openssh-client make mcurses-devel
3)Protobuf install
    ./configure --prefix=/usr/local/protoc/
    make
    make install
4)Maven install ( A little )
5)vi .bash_profile
   export MAVEN_HOME=/opt/softwares/apache-maven-3.2.5
   PATH=$MAVEN_HOME/bin:/usr/local/protoc/bin:$PATH
6)Hadoop compile
     mvn package –DskipTests –Pdist,native
7) After successful compilation , take hadoop-dist/target/hadoop-2.3.0-cdh5.0.2/lib/native Take down the file copy paper $HADOOP_HOME/lib/native Next , The documents are as follows :

libhadoop.a
libhadooppipes.a
libhadoop.so -> libhadoop.so.1.0.0
libhadoop.so.1.0.0
libhadooputils.a
libhdfs.a
libhdfs.so -> libhdfs.so.0.0.0
libhdfs.so.0.0.0

8) verification

hadoop checknative
15/11/06 15:46:41 WARN bzip2.Bzip2Factory: Failed to load/initialize native-bzip2 library system-native, will use pure-Java version
15/11/06 15:46:41 INFO zlib.ZlibFactory: Successfully loaded & initialized native-zlib library
Native library checking:
hadoop: true /opt/modules/hadoop-2.3.0-cdh5.0.2/lib/native/libhadoop.so.1.0.0
zlib: true /lib64/libz.so.1
snappy: false
lz4: true revision:99
bzip2: false

hadoop Source code compilation of more related articles

  1. hadoop Source code compilation

    hadoop Source code compilation 1. Get ready jar 1) hadoop-2.7.2-src.tar.gz 2) jdk-8u144-linux-x64.tar.gz 3) apach-ant-1.9.9-bin. ...

  2. Hadoop Source compilation process

    One .           Why compile Hadoop Source code Hadoop It's using Java Language development , But there are some requirements and operations that are not suitable for use java, So the local library is introduced (Native Libraries) The concept of , through ...

  3. Hadoop Build source code compilation environment

    The preparation of the instruments : maven 3.0.0 Version or higher ( Configuration center library ) protocbuff 2.5.0 http://www.zlib.net/ git bash(Windows Environment can use this tool to perform compilation ...

  4. hadoop Source code compilation ——2.5.0 edition

    Obsessive compulsive disorder must be treated : WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using b ...

  5. Hadoop Source code compilation and export

    https://svn.apache.org/repos/asf/hadoop/common/branches/branch-trunk-win/BUILDING.txt http://www.src ...

  6. hadoop Source code compilation --maven install

    One download maven bin Pack and unzip $ wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3 ...

  7. hadoop-1.2.0 Source code compilation

    The following is in CentOS-6.4 Next hadoop-1.2.0 Source code compilation steps . 1. Install and configure ant download ant, take ant In the catalog bin Add folders to PATH variable . 2. install git, install autoconf, ...

  8. Hadoop Source code reading environment building (IDEA)

    Get one Hadoop After the source , The two things that you always focus on are 1. How to read ? involve IDEA and Eclipse Project construction .IDEA build , Choose the source code , Step by step :Eclipse You can choose background generation project , You can also choose IDE Import ...

  9. Hadoop,HBase,Zookeeper Source code compilation and import eclipse

    Basic idea : Refer to official English documents as much as possible Hadoop:  http://wiki.apache.org/hadoop/FrontPage HBase:  http://hbase.apache.org/b ...

Random recommendation

  1. git Guide to action

    Git It's a distributed version management tool . Local projects and servers will have version Libraries , The local version library is controlled by itself , Free choice to submit code to the server windows It is also recommended to use the command method to use git, The client is recommended :http:/ ...

  2. xUtils 3.0 post The use of,

    github:https://github.com/wyouflf/xUtils3 xUtils3 brief introduction xUtils Contains a lot of practical android Tools . xUtils Support for large files ( exceed 2G) Upload , ...

  3. .NET Medium pass OUTLOOK Send attachment content

    Recently, I encountered a problem of sending email attachments , Any time , Convenient for later study . string[] files = System.IO.Directory.GetFiles(@"~/UploadData" ...

  4. Use custom Fonts @font-face Small test

    For the first time @font-face It's the function that my little friend showed me   It's amazing    @font-face yes CSS3 One of the modules in   With it, you can customize your web typeface To realize some wonderful ideas Let's start with ...

  5. Java List operation

      One .List:. There's an order that's stored in a linear way , Can store duplicate objects Thread safe methods :List list = Collections.synchronizedList(new LinkedList(...)); ...

  6. linux When copying files , newspaper cp: omitting directory `XXX'

    I'm using it today linux Command to copy a file omitting cp -i BBS /opt/workspace/apache-tomcat-6, The parameter is -i), So I'm not familiar with , original , And subdirectory files , It is necessary ...

  7. [LeetCode] 203. Remove Linked List Elements Their thinking

    Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --& ...

  8. java Console I / O

    One . Compare the traditional input method with input stream , After you get the string, you have to judge it separately . transformation Case study import java.io.BufferedReader; import java.io.IOException; import ...

  9. ●BOZJ 3144 [Hnoi2013] Cut cake

    Question chain : http://www.lydsy.com/JudgeOnline/problem.php?id=3144 Answer key : " This is a classical minimal cut model " --- Quote from someone else's blog .. ...

  10. use canvas The whole airplane game

    Statement : This is an original article , If you want to reprint , Please indicate the source WAxes, thank you ! I was a knight before DEMO I saw a game of flying in the movie , Then he took down his pictures and audio .... I wrote a new one with the mood of playing . Just for entertainment ...... I ...