Often encounter this warning
# HDFs DFS-LS/INPUT15/11/10 10:00:32 WARN util. nativecodeloader:unable to load Native-hadoop library for your platform ... using Builtin-java classes where applicable
Where's the problem? Some people say that this is the pre-compiled Hadoop package is 32bit, running on the 64bit will be problematic. But most of the time the answer is wrong.
How do I verify the 64bit or 32bit?
Go to the Hadoop installation directory
Cd/data/slot0/hadoop/lib/native
View dependent libraries with the LDD command
LDD libhadoop.so.1.0.0./libhadoop.so.1.0.0:/lib64/libc.so.6:version ' glibc_2.14 ' not found (required by./ libhadoop.so.1.0.0) linux-vdso.so.1 = (0x00007fff10b79000) libdl.so.2 =/lib64/libdl.so.2 ( 0x00007f4ef3512000) libc.so.6 =/lib64/libc.so.6 (0x00007f4ef317d000)/lib64/ld-linux-x86-64.so.2 ( 0x0000003401a00000)
You can see that the dependencies are/lib64/dynamic libraries, so it's not a 64-bit/32-bit problem.
But see error, glibc_2.14 can't find, now check the system GLIBC Library, LDD--version can check.
LDD--versionldd (GNU libc) 2.12Copyright (C), free software Foundation, Inc.this was free software; See the source for copying conditions. There is nowarranty; Not even to merchantability or FITNESS for A particular PURPOSE. Written by Roland McGrath and Ulrich drepper.
The original pre-installed GLIBC library is version 2.12, and Hadoop expects the 2.14 version, so print the warning message.
Now there are two ways to recompile the glibc.2.14 version, which is a bit dangerous to use for Hadoop after installation.
The second method removes the alarm information directly in the log4j log. Add in the/data/slot0/hadoop/etc/hadoop/log4j.properties file
Log4j.logger.org.apache.hadoop.util.nativecodeloader=error
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Remove HDFs WARN util. Nativecodeloader