Return-Path: Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: (qmail 98928 invoked from network); 23 Feb 2011 13:04:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2011 13:04:55 -0000 Received: (qmail 50157 invoked by uid 500); 23 Feb 2011 13:04:54 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 49966 invoked by uid 500); 23 Feb 2011 13:04:52 -0000 Mailing-List: contact mapreduce-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-user@hadoop.apache.org Delivered-To: mailing list mapreduce-user@hadoop.apache.org Received: (qmail 49952 invoked by uid 99); 23 Feb 2011 13:04:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Feb 2011 13:04:52 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of qwertymaniac@gmail.com designates 209.85.161.48 as permitted sender) Received: from [209.85.161.48] (HELO mail-fx0-f48.google.com) (209.85.161.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Feb 2011 13:04:45 +0000 Received: by fxm2 with SMTP id 2so2623277fxm.35 for ; Wed, 23 Feb 2011 05:04:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=AWIWocOTyxHVlBVSU8l3fqpsPIrgyT1lWYLZrobLMoU=; b=lgK+/ufheAIuqDexvIS2eOtTp2hUjIoIKokxUKCEQo8SKXg+khoURv99I/i14flXtq S2x4+gM8/dL5PMMdk7G9fyqiGnkLipZr3+YPCN3yqJLX4FVt2JGfpswsV9NqOP2F2OMn 5x0RrF0o6j0O+6sSElblAJI7QY8nBLGMc7EQI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=RPxqePvqnauWE7Z8f50ZcDE/uGYibiYNgop9HCD9GATS3NT+oZWQOm0Hm86JnX/QQD oFWljIu9vD8vPoNk4A2uYt2HSu0viBAXlxhk6I4+ocuHUlj0oZRk+fOr2wElsVJMA+35 MnNssEfsM1Sq5G15Ajs5UkRi8Er5LElvUiNnQ= Received: by 10.223.101.135 with SMTP id c7mr5072714fao.76.1298466141386; Wed, 23 Feb 2011 05:02:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.122.83 with HTTP; Wed, 23 Feb 2011 05:02:01 -0800 (PST) In-Reply-To: References: From: Harsh J Date: Wed, 23 Feb 2011 18:32:01 +0530 Message-ID: Subject: Re: Message in mapreduce class not logged To: mapreduce-user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org The logs should appear in each of the ReduceTask's log. Are they not appearing in them? On Wed, Feb 23, 2011 at 6:27 PM, Thomas Anderson wrote: > I have setup a cluster with several machines up and running. But I > encounter a problem that my mapper reducer class does not log. > > The hadoop version I use is 0.20.2. The rootLogger in log4j.properties > adds DRFA (daily rolling file appender) and RFA (rolling file > appender). > > My map reduce class looks as below > > public class MyTest{ > =A0 =A0 =A0 =A0public static final Log LOG =3D LogFactory.getLog(MyTest.c= lass); > > =A0 =A0 =A0 =A0public static class MiniMap extends Mapper Text, Text>{ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0private long count =3D 0; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0public void map(LongWritable key, Text val= ue, > Mapper.Context ctx) throws IOException, InterruptedException{ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0String valueString =3D val= ue.toString(); > LOG.info("XXXXXXXXXXX value string obtained: "+valueString); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ctx.write(new LongWritable= (counter++), > doSomething(valueString)); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > > =A0 =A0 =A0 =A0} > ... > =A0 =A0 =A0 =A0static String fetch(String urlpath){ > =A0 =A0 =A0 =A0 =A0... > LOG.info("xxxxxxxxxxxxxx"); > =A0 =A0 =A0 =A0 =A0 ... > =A0 =A0 =A0 =A0} > } > > The error shows 0java.lang.NullPointerException > > =A0 =A0[java] =A0 =A0 =A0at org.apache.hadoop.mapred.MapTask$MapOutputBuf= fer.collect(MapTask.java:849) > =A0 =A0 [java] =A0 =A0 at > org.apache.hadoop.mapred.MapTask$NewOutputCollector.write(MapTask.java:54= 1) > =A0 =A0 [java] =A0 =A0 at > org.apache.hadoop.mapreduce.TaskInputOutputContext.write(TaskInputOutputC= ontext.java:80) > =A0 =A0 [java] =A0 =A0 at myapp.MyTest.$MiniMap.map(MiniMap.java:51) > =A0 =A0 [java] =A0 =A0 at myapp.MyTest.$MiniMap.map(MiniMap.java:44) > > The error message points out the line that goes wrong, but the problem > is I do not see any message (in LOG.info(...)) get logged. > > What else I need to turn on or modify so that log message can be seen > in e.g. hadoop/logs/hadoop-...log? > > I appreciate any suggestion. > --=20 Harsh J www.harshj.com