The way of solving hadoop warning

When I use hadoop, I always get the warning of “WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable”

There are many way of solving it, I tried but failed, here’s one work for me.

  1. move all the files and contents in file /usr/local/hadoop/lib/native to its parent file /usr/local/hadoop/lib
  2. add some the environment variables into ~/.bashrc
    1. export HADOOP_HOME=/usr/local/hadoop
    2. export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib
    3. export PATH=$PATH:/usr/local/hadoop/sbin:/usr/local/hadoop/bin
    4. export HADOOP_OPTS=”-Djava.library.path=$HADOOP_HOME/lib”

The very good material of learning Hadoop in Udacity:

https://classroom.udacity.com/courses/ud617/lessons/308873795/concepts/3095085570923

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s