Hadoop中 Unable to load native-hadoop library for your platform... using builtin-java classes where a

Posted 董俊杰

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Hadoop中 Unable to load native-hadoop library for your platform... using builtin-java classes where a相关的知识,希望对你有一定的参考价值。

环境

[[email protected] soft]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m

[[email protected] soft]# uname -a
Linux vm8028 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] soft]# hadoop version
Hadoop 2.7.1
Subversion https://git-wip-us.apache.org/repos/asf/hadoop.git -r 15ecc87ccf4a0228f35af08fc56de536e6ce657a
Compiled by jenkins on 2015-06-29T06:04Z
Compiled with protoc 2.5.0
From source with checksum fc0a1a23fc1868e4d5ee7fa2b28a58a
This command was run using /usr/local/hadoop-2.7.1/share/hadoop/common/hadoop-common-2.7.1.jar


问题 ,安装完Hadoop之后操作总报这样的警告,但是不影响使用

[WARN ] 2018-04-18 18:07:39,897 method:org.apache.hadoop.util.NativeCodeLoader.<clinit>(NativeCodeLoader.java:62)
Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

[email protected] ~]# hadoop fs -ls /
[WARN ] 2018-04-18 18:07:39,897 method:org.apache.hadoop.util.NativeCodeLoader.<clinit>(NativeCodeLoader.java:62)
Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Found 2 items
drwxr-xr-x   - root supergroup          0 2018-04-18 16:49 /park
drwxr-xr-x   - root supergroup          0 2018-04-18 16:32 /user


问题原因:

因为Apache 提供的Hadoop的native库 是32位的,我们的操作系统是64位的,所以需要使用64位操作系统编译。或者下载编译好的64位本地包

这里提供一个下载地址 http://dl.bintray.com/sequenceiq/sequenceiq-bin/

因为没有找到2.7.1版本, (使用hadoop-native-64.tar 不行) 下载了hadoop-native-64-2.7.0.tar 替换本地库

 

[[email protected] soft]# tar -xvf hadoop-native-64-2.7.0.tar -C hadoop-native-64-2.7.0

[[email protected] lib]# mv /home/soft/hadoop-native-64-2.7.0  ./

[[email protected] lib]# mv hadoop-native-64-2.7.0 native

[[email protected] lib]# chown -R hadoop.hadoop native


重启Hadoop后问题解决

[[email protected] ~]# hadoop fs -ls /
Found 2 items
drwxr-xr-x   - root supergroup          0 2018-04-18 16:49 /park
drwxr-xr-x   - root supergroup          0 2018-04-18 16:32 /user

 

 

 

 

 

 

[[email protected] ~]# hadoop fs -ls /
[WARN ] 2018-04-18 18:07:39,897 method:org.apache.hadoop.util.NativeCodeLoader.<clinit>(NativeCodeLoader.java:62)
Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

以上是关于Hadoop中 Unable to load native-hadoop library for your platform... using builtin-java classes where a的主要内容,如果未能解决你的问题,请参考以下文章

解决 Unable to load native-hadoop library for your platform

解决Unable to load native-hadoop library for your platform

hadoop WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using b

hadoop错误INFO util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-

Hadoop安装—— WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platf