gpt4 book ai didi

Java 提示 Hadoop native 库

转载 作者:可可西里 更新时间:2023-11-01 14:33:47 24 4
gpt4 key购买 nike

在我的 Ubuntu x32、Java x32、Hadoop 2.5.0 上我执行:

hduser@master:~$ hdfs dfs -ls /
14/08/19 08:51:21 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Found 3 items
drwxr-xr-x - hduser supergroup 0 2014-08-19 08:37 /data
drwxr-xr-x - hduser supergroup 0 2014-08-19 08:37 /export
drwxrwx--- - hduser supergroup 0 2014-08-19 08:32 /tmp

谁能告诉我如何修复警告?

Java 版本:

hduser@master:~$ java -d64 -version
Error: This Java instance does not support a 64-bit JVM. Please install the desired version.

hduser@master:~$ java -d32 -version
java version "1.7.0_67" Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode)

Ubuntu 版本:

hduser@master:~$ uname -a Linux master 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:02:19 UTC 2014 i686 i686 i686 GNU/Linux

Hadoop 版本

hduser@master:~$ hadoop version Hadoop 2.5.0 Subversion http://svn.apache.org/repos/asf/hadoop/common -r 1616291 Compiled by jenkins on 2014-08-06T17:31Z Compiled with protoc 2.5.0 From source with checksum 423dcd5a752eddd8e45ead6fd5ff9a24 This command was run using /home/hduser/hadoop-2.5.0/share/hadoop/common/hadoop-common-2.5.0.jar

编辑:

.bashrc

export SQOOP_HOME=/home/hduser/sqoop
export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
export PATH=$PATH:$SQOOP_HOME/bin
export HADOOP_COMMON_HOME=/home/hduser/hadoop
export HADOOP_MAPRED_HOME=/home/hduser/hadoop
export HADOOP_HOME=/home/hduser/hadoop
export PATH=$PATH:$HADOOP_HOME/bin
export PIG_HOME=/home/hduser/pig
export PATH=$PATH:$PIG_HOME/bin
export HBASE_HOME=/home/hduser/hbase
export HIVE_HOME=/home/hduser/hive
export PATH=$PATH:$HIVE_HOME/bin

最佳答案

在您的环境中设置 LD_LIBRARY_PATH 指向 HADOOP_HOME/lib/native 中存在的 native 库路径

编辑:

此配置可能因您的 Hadoop 发行版或 Linux 风格而异。这是一个good link对 CentOS 有很好的解释。

关于Java 提示 Hadoop native 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25379351/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com