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.
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
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