Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hadoop log4j not working as No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory)

Tags:

log4j

hadoop

I am working on developing mapreduce using eclipse , and trying to test it using hadoop 2.6.0 windows standalone mode.

But getting the below error for log4j,

How to fix the below appender problem,

No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory)

same problem as hadoop log4j not working but no answer yet

Thanks ,

like image 927
RBanerjee Avatar asked Nov 24 '15 15:11

RBanerjee


1 Answers

1- Create the file log4j.properties and put it in the location of

src/main/resources

the content of the log4j.properties

hadoop.root.logger=DEBUG, console
log4j.rootLogger = DEBUG, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.target=System.out
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n

it happens because of the hadoop logging framework

like image 130
ankursingh1000 Avatar answered Oct 20 '22 01:10

ankursingh1000