2015-09-18 59 views
4

我是新与Hadoop和MapReduce的一个任务过程中,我得到了以下错误:无法加载类org.slf4j.impl.StaticLoggerBinder和无法加载原生的Hadoop库

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. 
15/09/18 07:31:10 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 

我该如何解决这个?

谢谢!

回答

7

这里是你的错误,意思是:

对于SLF4J

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. 

正如你所知道的,你没有相应的类(* 无法加载类*)为SLF4J工作所以它默认为不记录((NOP)记录器实现)。继建议link你可以看到这种情况的解决办法是:

Placing one (and only one) of slf4j-nop.jar , slf4j-simple.jar , slf4j-log4j12.jar , slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem

Hadoop的:

15/09/18 07:31:10 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 

这只是意味着本机库不能被发现,但一般不影响道路Hadoop功能。至于本机库:

The native library just contains implementations of certain components for performance reasons and for non-availability of Java implementations. These components are available in a single, dynamically-linked native library called the native hadoop library. On the *nix platforms the library is named libhadoop.so.

无论如何,如果你真的摆脱的警告,您可以按照提供here的众多解决方案之一。

相关问题