Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hadoop command and SLF4J error message cdh in ubuntu

The SLF4J error has been bugging me for a while now. It appears every time I type any hadoop shell command before showing the output of the command.

$ hadoop fs -ls
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
details.

This is a pseudo distributed installation of cdh5 on Ubuntu 14.04.

like image 444
Antoni Avatar asked Aug 01 '14 22:08

Antoni


1 Answers

Currently cloudera cdh5 does not officialy supports Ubuntu 14.04, although in the forums it says it will support it sometime before end of year.

However, I found a workaround.

Edit your hadoop-env.sh and add:

export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/usr/share/java/slf4j-simple.jar

Where the /usr/share/java/slf4j-simple.jar should point to an implementation of slf4j present in your system (I simply did a find /usr/. -name slf4j*.jar -print to find it)

See http://www.slf4j.org/codes.html#StaticLoggerBinder for details

Now the logs works

like image 152
Antoni Avatar answered Sep 23 '22 17:09

Antoni