I've installed Hadoop 2.7.2 single node on Ubuntu and I want to run the java wordcount program. The compilation and the creation of the jar file are done succesfully, but when I run the jar file on Hadoop I receive this message:
WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
I set environment variables by editing .bashrc file:
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib
When I type hadoop checknative -a I get this:
hadoop: true /usr/local/hadoop/lib/native/libhadoop.so.1.0.0
zlib: true /lib/x86_64-linux-gnu/libz.so.1
snappy: false
lz4: true revision:99
bzip2: false
openssl: true /usr/lib/x86_64-linux-gnu/libcrypto.so
16/05/09 00:48:53 INFO util.ExitUtil: Exiting with status 1
Hadoop version: 2.7.2
Ubuntu version: 14.04
Could anyone give some clues about the issue?
Move your compiled native library files to $HADOOP_HOME/lib folder.
Then set your environment variables by editing .bashrc file
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib
export HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=$HADOOP_HOME/lib"
Make sure your compiled native library files are in $HADOOP_HOME/lib folder.
It should fix the issue.
Add the commands lines below to hadoop-env.sh
, it should suppress the errors encountered
export HADOOP_HOME_WARN_SUPPRESS=1
export HADOOP_ROOT_LOGGER="WARN,DRFA"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With