Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce >> mail # user >> Adding log messages to src files, but they don't appear in logs ...


Copy link to this message
-
Re: Adding log messages to src files, but they don't appear in logs ...
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
> well.
>
> 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.

DR