ubuntu14.04 hadoop2.2.0
搭建环境后运行自己写的wordcount,在eclipse中没有调试信息输出,只有下面的几行warn,在shell下运行没问题。
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.
是不是log4j配置的问题?已经改过了/etc/hadoop/hadoop-env.sh: 加入了export HADOOP_ROOT_LOGGER="DEBUG,DRFA" 也已经改过了/etc/hadoop/log4j.properties: # Define some default values that can be overridden by system properties hadoop.root.logger=DEBUG,console hadoop.log.dir=. hadoop.log.file=hadoop.log
将/etc/hadoop/下的log4j.properties文件拷贝到eclipse下的项目中,不用做任何修改
|