Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 36E60EEF8 for ; Thu, 7 Feb 2013 18:47:59 +0000 (UTC) Received: (qmail 91756 invoked by uid 500); 7 Feb 2013 18:47:54 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 91627 invoked by uid 500); 7 Feb 2013 18:47:54 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 91608 invoked by uid 99); 7 Feb 2013 18:47:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2013 18:47:54 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of harsh@cloudera.com designates 209.85.223.180 as permitted sender) Received: from [209.85.223.180] (HELO mail-ie0-f180.google.com) (209.85.223.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2013 18:47:49 +0000 Received: by mail-ie0-f180.google.com with SMTP id bn7so3907645ieb.25 for ; Thu, 07 Feb 2013 10:47:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type:x-gm-message-state; bh=uO/qQH2TNL/w8/t9Hdu8eJG6mdiRMUIXJlwsZ2RaG38=; b=Ta9Jh/9d9AHNU3Fb+EDF+bXwveQiz+ViL02ZPAbPyNjLsxQVzUAOwtV3JVmfhiL5l0 nVGneITUGj+Bny+ztar1ag7cbw+w3locc0oVYn9uG4i9A0eLFmqzEy4w7P/zIQvWW5id fDWtLcZQ61uju1l6ohRTmrEv8dTDBU8Hncb3F8Hd0VmvzJPkYKJn+l+OLJIhjb7H/ub+ JP5db/V5oNRLme35LpWbPmAs2Xsfi4Meo161eF+a6hiVtqv/zOleiXyW5Kt84fcRKsBg 428F4aBZjuGyz6r21yjQ905u/dnMeklCih4/7j0PsNP4twjMjH4F8nHoSY8qoWJ3FxcG W8aQ== X-Received: by 10.50.184.164 with SMTP id ev4mr16587194igc.91.1360262837974; Thu, 07 Feb 2013 10:47:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.208.67 with HTTP; Thu, 7 Feb 2013 10:46:55 -0800 (PST) In-Reply-To: References: From: Harsh J Date: Fri, 8 Feb 2013 00:16:55 +0530 Message-ID: Subject: Re: Secondary Sort example error To: "" Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQm8TuuW0cR9vgKAy923hfvMJHEZuLj35GynlmzELvJDJpkqMNKceymmsSOsdgp6353voKaL X-Virus-Checked: Checked by ClamAV on apache.org Thanks, I managed to correlate proper line numbers. Are you using some form of custom serialization in your job code? That is, are your keys non-Writable types and are of some other type? The specific NPE is arising from the SerializationFactory not being able to find a serializer for your Map-Output key class. You may want to look into that direction, or share your code for the list to spot it instead. On Fri, Feb 8, 2013 at 12:11 AM, Ravi Chandran wrote: > hi, > > it is Hadoop 2.0.0-cdh4.1.1. the whole output is given below: > > Hadoop 2.0.0-cdh4.1.1 > Subversion > file:///data/1/jenkins/workspace/generic-package-centos32-6/topdir/BUILD/hadoop-2.0.0-cdh4.1.1/src/hadoop-common-project/hadoop-common > -r 581959ba23e4af85afd8db98b7687662fe9c5f20 > > > > On Fri, Feb 8, 2013 at 12:04 AM, Harsh J wrote: >> >> Hey Ravi, >> >> What version of Hadoop is this exactly? (Type and send output of >> "hadoop version" if unsure) >> >> On Thu, Feb 7, 2013 at 11:55 PM, Ravi Chandran >> wrote: >> > Hi, >> > >> > I am trying to do a name sorting using secondary sort. I have a working >> > example, which I am taking as a reference. But I am getting a null >> > pointer >> > error in the MapTask class. I am not able to locate the reason. as the >> > logic >> > to create the Custom Object from a given file has been tested through a >> > java >> > class.. >> > I am getting this error: >> > >> > 13/02/07 12:23:42 WARN snappy.LoadSnappy: Snappy native library is >> > available >> > 13/02/07 12:23:42 INFO snappy.LoadSnappy: Snappy native library loaded >> > 13/02/07 12:23:42 INFO mapred.FileInputFormat: Total input paths to >> > process >> > : 1 >> > 13/02/07 12:23:43 INFO mapred.JobClient: Running job: >> > job_201301301056_0014 >> > 13/02/07 12:23:44 INFO mapred.JobClient: map 0% reduce 0% >> > 13/02/07 12:23:56 INFO mapred.JobClient: Task Id : >> > attempt_201301301056_0014_m_000000_0, Status : FAILED >> > java.lang.NullPointerException >> > at >> > >> > org.apache.hadoop.mapred.MapTask$MapOutputBuffer.(MapTask.java:814) >> > at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:385) >> > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:327) >> > at org.apache.hadoop.mapred.Child$4.run(Child.java:268) >> > at java.security.AccessController.doPrivileged(Native Method) >> > at javax.security.auth.Subject.doAs(Subject.java:396) >> > at >> > >> > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1332) >> > at org.apache.hadoop.mapred.Child.main(Child.java:262) >> > 13/02/07 12:23:57 INFO mapred.JobClient: Task Id : >> > attempt_201301301056_0014_m_000001_0, Status : FAILED >> > java.lang.NullPointerException >> > at >> > >> > org.apache.hadoop.mapred.MapTask$MapOutputBuffer.(MapTask.java:814) >> > at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:385) >> > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:327) >> > at org.apache.hadoop.mapred.Child$4.run(Child.java:268) >> > at java.security.AccessController.doPrivileged(Native Method) >> > at javax.security.auth.Subject.doAs(Subject.java:396) >> > at >> > >> > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1332) >> > at org.apache.hadoop.mapred.Child.main(Child.java:262) >> > >> > I am giving the Mapper code below: >> > >> > import java.io.IOException; >> > import org.apache.hadoop.io.LongWritable; >> > import org.apache.hadoop.io.Text; >> > import org.apache.hadoop.mapred.MapReduceBase; >> > import org.apache.hadoop.mapred.Mapper; >> > import org.apache.hadoop.mapred.OutputCollector; >> > import org.apache.hadoop.mapred.Reporter; >> > import org.apache.log4j.Logger; >> > import com.pom.Name; >> > >> > public class StubMapper extends MapReduceBase implements >> > Mapper { >> > >> > private static Logger logger = >> > Logger.getLogger(StubMapper.class.getName()); >> > >> > StringBuffer readLine = new StringBuffer(); >> > private final Name name = new Name(); >> > @Override >> > public void map(LongWritable key, Text value, >> > OutputCollector output, Reporter reporter) >> > throws IOException { >> > String line = value.toString(); >> > String[] packer = null; >> > >> > packer = line.split(" "); >> > >> > // create the object >> > if(packer.length>2) >> > { >> > // take everything except last name >> > for (int i = 0; i < packer.length-1; i++) { >> > readLine.append(packer[i]+" "); >> > } >> > >> > name.setfName(readLine.toString()); >> > name.setlName(packer[packer.length-1]); >> > >> > //clear the variable >> > readLine.delete(0, readLine.length()); >> > } >> > else if(packer.length>0) >> > { >> > name.setfName(packer[0]); >> > name.setlName(packer[1]); >> > } >> > >> > output.collect(name, new Text(name.getlName())); >> > >> > } >> > } >> > >> > I am not able to figure out the possible cause.. >> > >> > -- >> > Thanks & Regards >> > Ravi >> >> >> >> -- >> Harsh J > > > > > -- > Thanks & Regards > Ravi -- Harsh J