zoukankan      html  css  js  c++  java
  • WARN bzip2.Bzip2Factory: Failed to load/initialize native-bzip2 library system-native, will use pure-Java version

    [root@hdp2 /root]#hadoop checknative -a

    18/12/09 00:31:19 WARN bzip2.Bzip2Factory: Failed to load/initialize native-bzip2 library system-native, will use pure-Java version

    18/12/09 00:31:19 INFO zlib.ZlibFactory: Successfully loaded & initialized native-zlib library
    Native library checking:
    hadoop: true /mnt/software/hadoop-2.6.0-cdh5.7.0/lib/native/libhadoop.so.1.0.0
    zlib: true /lib64/libz.so.1
    snappy: true /mnt/software/hadoop-2.6.0-cdh5.7.0/lib/native/libsnappy.so.1
    lz4: true revision:99
    bzip2: false
    openssl: true /lib64/libcrypto.so
    18/12/09 00:31:19 INFO util.ExitUtil: Exiting with status 1

    不支持bzip2 

    解决方案

    1    按照bzip2包  

    yum -y install bzip2-devel

    2 安装成功后  重新编译Hadoop  到Hadoop源码目录下

     mvn package -Pdist,native -DskipTests -Dtar -Djavax.net.debug=all

    3 编译完之后 检查 是否编译成功

    strings ~/build/hadoop-2.6.0-cdh5.7.0/hadoop-dist/target/hadoop-2.6.0-cdh5.7.0/lib/native/libhadoop.so | grep initIDs

    看到有bzip2信息表示成功

    4  拷贝编译好的native下文件 替换

    cp ~/build/hadoop-2.6.0-cdh5.7.0/hadoop-dist/target/hadoop-2.6.0-cdh5.7.0/lib/native/*  /mnt/software/hadoop-2.6.0-cdh5.7.0/lib/native/

    5 然后 再次执行Hadoop checknative -a

    [root@hdp1 /mnt/software/hadoop-2.6.0-cdh5.7.0/lib]#hadoop checknative -a

    解决问题

  • 相关阅读:
    转载php在IIS中运行
    程序员必去的网站
    分享一下jQuery UI的地址
    dbcp相关配置
    shell学习第二弹-进阶
    shell学习第一弹-初识
    java servlet 3.0文件上传
    Junit使用第二弹
    各个数据库中,查询前n条记录的方法
    junit使用第一弹
  • 原文地址:https://www.cnblogs.com/QuestionsZhang/p/10092029.html
Copyright © 2011-2022 走看看