You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by "Daniel,Wu" <ha...@163.com> on 2011/07/28 08:16:30 UTC

where to find the log info

Hi everyone,

I am new to it, and want to do some debug/log. I'd like to check what the value is for each mapper execution. If I add the following code in bold, where can I find the log info? If I can't do it in this way, how should I do?

     public void map(Object key, Text value, Context context
                    ) throws IOException, InterruptedException {
      StringTokenizer itr = new StringTokenizer(value.toString());
      System.out.println(value.toString);
      while (itr.hasMoreTokens()) {
        word.set(itr.nextToken());
        context.write(word, one);
      }
    }
  }

Re: where to find the log info

Posted by Harsh J <ha...@cloudera.com>.
Task logs are written to userlogs directory on the TT nodes. You can
view task logs on the JobTracker/TaskTracker web UI for each task at:

http://machine:50030/taskdetails.jsp?jobid=<JOBID>&tipid=<TASKID>

All of syslogs, stdout and stderr logs are available in the links to
logs off that page.

2011/7/28 Daniel,Wu <ha...@163.com>:
> Hi everyone,
>
> I am new to it, and want to do some debug/log. I'd like to check what the value is for each mapper execution. If I add the following code in bold, where can I find the log info? If I can't do it in this way, how should I do?
>
>     public void map(Object key, Text value, Context context
>                    ) throws IOException, InterruptedException {
>      StringTokenizer itr = new StringTokenizer(value.toString());
>      System.out.println(value.toString);
>      while (itr.hasMoreTokens()) {
>        word.set(itr.nextToken());
>        context.write(word, one);
>      }
>    }
>  }



-- 
Harsh J

RE: where to find the log info

Posted by Devaraj K <de...@huawei.com>.
Daniel, You can find those std out statements in  "{LOG
Directory}/userlogs/{task attemp id}/stdout" file.

Same way you can find std err statements in "{LOG Directory}/userlogs/{task
attemp id}/stderr" and log statements in "{LOG Directory}/userlogs/{task
attemp id}/syslog".

Devaraj K 

-----Original Message-----
From: Daniel,Wu [mailto:hadoop_wu@163.com] 
Sent: Thursday, July 28, 2011 11:47 AM
To: common-user@hadoop.apache.org
Subject: where to find the log info

Hi everyone,

I am new to it, and want to do some debug/log. I'd like to check what the
value is for each mapper execution. If I add the following code in bold,
where can I find the log info? If I can't do it in this way, how should I
do?

     public void map(Object key, Text value, Context context
                    ) throws IOException, InterruptedException {
      StringTokenizer itr = new StringTokenizer(value.toString());
      System.out.println(value.toString);
      while (itr.hasMoreTokens()) {
        word.set(itr.nextToken());
        context.write(word, one);
      }
    }
  }