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 Arko Provo Mukherjee <ar...@gmail.com> on 2011/09/27 01:47:59 UTC

System.out.println in Map / Reduce

Hi,

I am writing some Map Reduce programs in pseudo-distributed mode.

I am getting some error in my program and would like to debug it.

For that I want to embed some print statements in my Map / Reduce.

But when I am running the mappers, the prints doesn't seem to show up in the
terminal.

Does the mappers / reducers redirect the prints to some files or are
they suppressed or it is a problem with my program?

Many thanks in advance!

Thanks & regards
Arko

Re: System.out.println in Map / Reduce

Posted by Joey Echeverria <jo...@cloudera.com>.
Print out go to the task logs. You can see those in the log directory on the tasktracker nodes or through the jobtracker web GUI. 

-Joey



On Sep 26, 2011, at 19:47, Arko Provo Mukherjee <ar...@gmail.com> wrote:

> Hi,
> 
> I am writing some Map Reduce programs in pseudo-distributed mode.
> 
> I am getting some error in my program and would like to debug it.
> 
> For that I want to embed some print statements in my Map / Reduce.
> 
> But when I am running the mappers, the prints doesn't seem to show up in the terminal.
> 
> Does the mappers / reducers redirect the prints to some files or are they suppressed or it is a problem with my program?
> 
> Many thanks in advance!
> 
> Thanks & regards
> Arko

Re: System.out.println in Map / Reduce

Posted by Arko Provo Mukherjee <ar...@gmail.com>.
Great! I got it.
Thank you so much!
Warm regards
Arko

On Sep 26, 2011, at 10:18 PM, Subroto Sanyal <su...@huawei.com> wrote:

> Hi Arko,
> 
>  
> 
> Request you to look into the “userlogs” folder of the corresponding task.
> 
> It will have three file sysout, syslog and syserr. Your System.out.println() will be captured in these files.
> 
> The usual location for “userlogs” folder is “${HADOOP_LOG_DIR}/userlogs”.
> 
>  
> 
> From MapReduce tutorial at: http://hadoop.apache.org/common/docs/r0.18.3/mapred_tutorial.html
> 
>  
> 
> *The standard output (stdout) and error (stderr) streams of the task are read by the TaskTracker and logged to ${HADOOP_LOG_DIR}/userlogs *
> 
>  
> 
> Regards, 
> Subroto Sanyal
> 
> From: Arko Provo Mukherjee [mailto:arkoprovomukherjee@gmail.com] 
> Sent: Tuesday, September 27, 2011 5:18 AM
> To: mapreduce-user@hadoop.apache.org
> Subject: System.out.println in Map / Reduce
> 
>  
> 
> Hi,
> 
>  
> 
> I am writing some Map Reduce programs in pseudo-distributed mode.
> 
> 
> I am getting some error in my program and would like to debug it.
> 
>  
> 
> For that I want to embed some print statements in my Map / Reduce.
> 
>  
> 
> But when I am running the mappers, the prints doesn't seem to show up in the terminal.
> 
>  
> 
> Does the mappers / reducers redirect the prints to some files or are they suppressed or it is a problem with my program?
> 
>  
> 
> Many thanks in advance!
> 
> Thanks & regards
> 
> Arko

RE: System.out.println in Map / Reduce

Posted by Subroto Sanyal <su...@huawei.com>.
Hi Arko,

 

Request you to look into the "userlogs" folder of the corresponding task.

It will have three file sysout, syslog and syserr. Your System.out.println()
will be captured in these files.

The usual location for "userlogs" folder is "${HADOOP_LOG_DIR}/userlogs".

 

>From MapReduce tutorial at:
http://hadoop.apache.org/common/docs/r0.18.3/mapred_tutorial.html

 

*The standard output (stdout) and error (stderr) streams of the task are
read by the TaskTracker and logged to ${HADOOP_LOG_DIR}/userlogs *

 

Regards, 
Subroto Sanyal

  _____  

From: Arko Provo Mukherjee [mailto:arkoprovomukherjee@gmail.com] 
Sent: Tuesday, September 27, 2011 5:18 AM
To: mapreduce-user@hadoop.apache.org
Subject: System.out.println in Map / Reduce

 

Hi,

 

I am writing some Map Reduce programs in pseudo-distributed mode.


I am getting some error in my program and would like to debug it.

 

For that I want to embed some print statements in my Map / Reduce.

 

But when I am running the mappers, the prints doesn't seem to show up in the
terminal.

 

Does the mappers / reducers redirect the prints to some files or are they
suppressed or it is a problem with my program?

 

Many thanks in advance!

Thanks & regards

Arko