hadoop -- Unable to load native-hadoop library for your platform” warning


绚烂如繁樱,瞬息绽放后凋落


说明

在执行 hadoop 中时候,日志中总是出现下面的 warning,虽没什么影响,但是看得不顺眼

Unable to load native-hadoop library for your platform

解决

$ $ vim /opt/hadoop/etc/hadoop/hadoop-env.sh

# 加入以下环境变量
export HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=/usr/local/hadoop/lib/native"

export HADOOP_COMMON_LIB_NATIVE_DIR="/usr/local/hadoop/lib/native/"