在eclipse中运行Hadoop程序时出现如下问题:
log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" java.io.IOException: Job failed! at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:836) at hadoop.in.action.WordCount.run(WordCount.java:89) at hadoop.in.action.WordCount.main(WordCount.java:98)
解决办法:将${HADOOP_HOME}/etc/hadoop/log4j.properties 拷贝到eclipse项目的sec文件夹下。