zoukankan      html  css  js  c++  java
  • Hadoop中 Unable to load native-hadoop library for your platform... using builtin-java classes where applicable问题解决

    环境

    [root@vm8028 soft]# cat /etc/issue
    CentOS release 6.5 (Final)
    Kernel 
     on an m
    
    [root@vm8028 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
    [root@vm8028 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

    root@vm8028 ~]# 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 替换本地库

    [root@vm8028 soft]# tar -xvf hadoop-native-64-2.7.0.tar -C hadoop-native-64-2.7.0
    
    [root@vm8028 lib]# mv /home/soft/hadoop-native-64-2.7.0  ./
    
    [root@vm8028 lib]# mv hadoop-native-64-2.7.0 native
    
    [root@vm8028 lib]# chown -R hadoop.hadoop native


    重启Hadoop后问题解决

    [root@vm8028 ~]# 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
  • 相关阅读:
    Linux产生coredump文件(core)
    shell脚本每五分钟执行一次可执行程序(nohup)
    VIM快捷操作
    日期正则表达式
    istringstream字符串流对象
    json和pickle模块
    sys模块
    random模块
    time模块
    python的模块
  • 原文地址:https://www.cnblogs.com/xd502djj/p/8877319.html
Copyright © 2011-2022 走看看