You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Rita Liu <cr...@gmail.com> on 2010/09/07 18:59:34 UTC

Adding log messages to src files, but they don't appear in logs ...

Hi all,

I still have the same problem -- So far I've added some log messages to
WordCount.java and JobClient.java with "info" level, but none of them shows
in any of the logs (JobTracker, TaskTracker, Namenode, Datanode,
SecondaryNamenode) under logs/. However, when I add a log message with the
same level to HeartbeatResponse.java, my log message does show in
JobTracker.log.

Do you have any idea why? If you do, please do let me know? Thank you so
very much!

Best,
Rita :)

Re: Adding log messages to src files, but they don't appear in logs ...

Posted by David Rosenstrauch <da...@darose.net>.
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

Re: Adding log messages to src files, but they don't appear in logs ...

Posted by Rita Liu <cr...@gmail.com>.
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? I suppose it must have
something to do with log4j.properties, but I don't see why.

Please let me know if possible? Thank you very much!
-Rita :))

On Tue, Sep 7, 2010 at 7:45 PM, Rita Liu <cr...@gmail.com> wrote:

> Actually, I did, but still couldn't find my log messages. I'll double check
> and reply to this thread later tonight, but I am pretty sure that they are
> not there either :S
>
> Please help? Thanks a lot!  -Rita :S
>
>
> On Tue, Sep 7, 2010 at 10:46 AM, Owen O'Malley <om...@apache.org> wrote:
>
>>
>> On Sep 7, 2010, at 9:59 AM, Rita Liu wrote:
>>
>>  Hi all,
>>>
>>> I still have the same problem -- So far I've added some log messages to
>>> WordCount.java and JobClient.java with "info" level, but none of them shows
>>> in any of the logs (JobTracker, TaskTracker, Namenode, Datanode,
>>> SecondaryNamenode) under logs/. However, when I add a log message with the
>>> same level to HeartbeatResponse.java, my log message does show in
>>> JobTracker.log.
>>>
>>> Do you have any idea why? If you do, please do let me know? Thank you so
>>> very much!
>>>
>>
>> Look at the JobTracker's webui. The task logs are available under the
>> details for each task.
>>
>> -- Owen
>>
>
>

Re: Adding log messages to src files, but they don't appear in logs ...

Posted by Rita Liu <cr...@gmail.com>.
Actually, I did, but still couldn't find my log messages. I'll double check
and reply to this thread later tonight, but I am pretty sure that they are
not there either :S

Please help? Thanks a lot!  -Rita :S

On Tue, Sep 7, 2010 at 10:46 AM, Owen O'Malley <om...@apache.org> wrote:

>
> On Sep 7, 2010, at 9:59 AM, Rita Liu wrote:
>
>  Hi all,
>>
>> I still have the same problem -- So far I've added some log messages to
>> WordCount.java and JobClient.java with "info" level, but none of them shows
>> in any of the logs (JobTracker, TaskTracker, Namenode, Datanode,
>> SecondaryNamenode) under logs/. However, when I add a log message with the
>> same level to HeartbeatResponse.java, my log message does show in
>> JobTracker.log.
>>
>> Do you have any idea why? If you do, please do let me know? Thank you so
>> very much!
>>
>
> Look at the JobTracker's webui. The task logs are available under the
> details for each task.
>
> -- Owen
>

Re: Adding log messages to src files, but they don't appear in logs ...

Posted by Owen O'Malley <om...@apache.org>.
On Sep 7, 2010, at 9:59 AM, Rita Liu wrote:

> Hi all,
>
> I still have the same problem -- So far I've added some log messages  
> to WordCount.java and JobClient.java with "info" level, but none of  
> them shows in any of the logs (JobTracker, TaskTracker, Namenode,  
> Datanode, SecondaryNamenode) under logs/. However, when I add a log  
> message with the same level to HeartbeatResponse.java, my log  
> message does show in JobTracker.log.
>
> Do you have any idea why? If you do, please do let me know? Thank  
> you so very much!

Look at the JobTracker's webui. The task logs are available under the  
details for each task.

-- Owen