-Re: Adding log messages to src files, but they don't appear in logs ...
David Rosenstrauch 2010-09-08, 14:09
On 09/08/2010 05:00 AM, Rita Liu wrote:
> Hi :) I double check the logs. The log messages I added to mapper and
> reducer in WordCount.java now appear in userlogs/, and the log messages I
> added to run() and main() in WordCount.java appear on the console. Moreover
> -- the log message I added to JobClient's init() appear on the console as
> How come some of the log messages go to those five logs (jobtracker,
> tasktracer, etc) but some go to console instead?
Simple - Hadoop is a distributed system, designed to run on a cluster of
machines. Since WordCount.java runs on your local (client) machine, log
messages in that app appear on that machine. The map/reduce tasks run
on separate machines in the cluster, and so log messages from them
appear on the machines they're running on.
Even if you're running Hadoop in pseudo-distributed mode (i.e., all
processes running on your local machine) the log messages will still get
handled this way.