Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 640A0E58D for ; Thu, 31 Jan 2013 07:12:06 +0000 (UTC) Received: (qmail 50301 invoked by uid 500); 31 Jan 2013 07:12:01 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 50021 invoked by uid 500); 31 Jan 2013 07:12:01 -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 49922 invoked by uid 99); 31 Jan 2013 07:11:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2013 07:11:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dontariq@gmail.com designates 209.85.220.177 as permitted sender) Received: from [209.85.220.177] (HELO mail-vc0-f177.google.com) (209.85.220.177) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2013 07:11:49 +0000 Received: by mail-vc0-f177.google.com with SMTP id m18so1560102vcm.22 for ; Wed, 30 Jan 2013 23:11:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=joSkr6flb6YR9eJH/NNbM26a1i/iSJRj7ncrGEPKWFc=; b=ZJOqhjrmutM8C73ZThsAnN4ZV7YxrYQ7P9+eoY15IpfGYcIv4sc/Bwatn8c97YRHMo vPkRZV/l080Vbak2kWJtN9dcxxl6O4AqsgIa0L/UA0YNmQOgOnVLOOc+sTdoAyRpW2TI FsLDY7ci7XNk/z5aH7atY4RdoXZtzYyFgKNDzdidLMSl2u6/ygylUAkcNrKEhFUr5H53 yz+Pmq2bVcPf2vtQIqoqIFtAt43cKOq46OHhIdR47kueojZW7xGjtxE67qDbZXl+0LLZ Yvgr7WmYgeuB6dhuGMXkosc4CS1gg26DXzrHYkfU2XnHGy7tIkdXc4xpCvLAkMH+PdXa jLHw== X-Received: by 10.52.95.233 with SMTP id dn9mr6314144vdb.88.1359616288286; Wed, 30 Jan 2013 23:11:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.58.34.16 with HTTP; Wed, 30 Jan 2013 23:10:48 -0800 (PST) In-Reply-To: References: From: Mohammad Tariq Date: Thu, 31 Jan 2013 12:40:48 +0530 Message-ID: Subject: Re: Issue with running hadoop program using eclipse To: "user@hadoop.apache.org" Content-Type: multipart/alternative; boundary=20cf307f3bbee4e6dc04d490559f X-Virus-Checked: Checked by ClamAV on apache.org --20cf307f3bbee4e6dc04d490559f Content-Type: text/plain; charset=ISO-8859-1 Hello Vikas, It clearly shows that the class can not be found. For debugging, you can write your MR job as a standalone java program and debug it. It works. And if you want to just debug your mapper / reducer logic, you should look into using MRUnit. There is a good write-upat Cloudera's blog section which talks about it in detail. HTH Warm Regards, Tariq https://mtariq.jux.com/ cloudfront.blogspot.com On Thu, Jan 31, 2013 at 11:56 AM, Vikas Jadhav wrote: > Hi > I have one windows machine and one linux machine > my eclipse is on winowds machine > and hadoop running on single linux machine > I am trying to run wordcount program from eclipse(on windows machine) to > Hadoop(on linux machine) > I getting following error > > 3/01/31 11:48:14 WARN mapred.JobClient: Use GenericOptionsParser for > parsing the arguments. Applications should implement Tool for the same. > 13/01/31 11:48:15 WARN mapred.JobClient: No job jar file set. User > classes may not be found. See JobConf(Class) or JobConf#setJar(String). > 13/01/31 11:48:16 INFO input.FileInputFormat: Total input paths to process > : 1 > 13/01/31 11:48:16 WARN util.NativeCodeLoader: Unable to load native-hadoop > library for your platform... using builtin-java classes where applicable > 13/01/31 11:48:16 WARN snappy.LoadSnappy: Snappy native library not loaded > 13/01/31 11:48:26 INFO mapred.JobClient: Running job: job_201301300613_0029 > 13/01/31 11:48:27 INFO mapred.JobClient: map 0% reduce 0% > 13/01/31 11:48:40 INFO mapred.JobClient: Task Id : > attempt_201301300613_0029_m_000000_0, Status : FAILED > java.lang.RuntimeException: java.lang.ClassNotFoundException: > WordCount$MapClass > at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:867) > at > org.apache.hadoop.mapreduce.JobContext.getMapperClass(JobContext.java:199) > at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:719) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370) > at org.apache.hadoop.mapred.Child$4.run(Child.java:255) > 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:1121) > at org.apache.hadoop.mapred.Child.main(Child.java:249) > Caused by: java.lang.ClassNotFoundException: WordCount$MapClass > at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > at java.lang.ClassLoader.loadClass(ClassLoader.java:247) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:247) > at > org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:820) > at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:865) > ... 8 more > > > > > Also I want to know how to debug Hadoop Program using eclipse. > > > > > Thank You. > > --20cf307f3bbee4e6dc04d490559f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello Vikas,

=A0 =A0 =A0 =A0 =A0 =A0 = =A0It clearly shows that the class can not be found. For debugging, you can= write your MR job as a standalone java program and debug it. It works.=A0A= nd if you want to just debug your mapper / reducer logic, you should look i= nto using MRUnit. There is a good write-up at Cloudera= 's blog section which talks about it in detail.

HTH



On Thu, Jan 31, 2013 at 11:56 AM, Vikas = Jadhav <vikascjadhav87@gmail.com> wrote:
Hi
I have one windows machine and one linux mac= hine
my eclipse is on winowds machine
and hadoop runnin= g on single linux machine
I am trying to run wordcou= nt program from eclipse(on windows machine) to Hadoop(on linux machine)
I getting following error
=A0
=A03/01/31 11:48:14 WARN ma= pred.JobClient: Use GenericOptionsParser for parsing the arguments. Applica= tions should implement Tool for the same.
13/01/31 11:48:15 WARN mapred.JobClient: No job jar file set.=A0 User class= es may not be found. See JobConf(Class) or JobConf#setJar(String).
13/01= /31 11:48:16 INFO input.FileInputFormat: Total input paths to process : 1 13/01/31 11:48:16 WARN util.NativeCodeLoader: Unable to load native-hadoop = library for your platform... using builtin-java classes where applicable13/01/31 11:48:16 WARN snappy.LoadSnappy: Snappy native library not loaded=
13/01/31 11:48:26 INFO mapred.JobClient: Running job: job_201301300613_0029=
13/01/31 11:48:27 INFO mapred.JobClient:=A0 map 0% reduce 0%
13/01/3= 1 11:48:40 INFO mapred.JobClient: Task Id : attempt_201301300613_0029_m_000= 000_0, Status : FAILED
java.lang.RuntimeException: java.lang.ClassNotFoundException: WordCount$Map= Class
=A0at org.apache.hadoop.conf.Configuration.getClass(Configuration.= java:867)
=A0at org.apache.hadoop.mapreduce.JobContext.getMapperClass(Jo= bContext.java:199)
=A0at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:719)
= =A0at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)
=A0at org.a= pache.hadoop.mapred.Child$4.run(Child.java:255)
=A0at java.security.Acce= ssController.doPrivileged(Native Method)
=A0at javax.security.auth.Subject.doAs(Subject.java:396)
=A0at org.apach= e.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)=
=A0at org.apache.hadoop.mapred.Child.main(Child.java:249)
Caused by:= java.lang.ClassNotFoundException: WordCount$MapClass
=A0at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
=A0at java.= security.AccessController.doPrivileged(Native Method)
=A0at java.net.URL= ClassLoader.findClass(URLClassLoader.java:190)
=A0at java.lang.ClassLoad= er.loadClass(ClassLoader.java:306)
=A0at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
=A0a= t java.lang.ClassLoader.loadClass(ClassLoader.java:247)
=A0at java.lang.= Class.forName0(Native Method)
=A0at java.lang.Class.forName(Class.java:2= 47)
=A0at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.jav= a:820)
=A0at org.apache.hadoop.conf.Configuration.getClass(Configuration= .java:865)
=A0... 8 more
=A0
=A0
=A0
=
=A0
Also I want to know how= to debug Hadoop Program using eclipse.
=A0
=A0
=A0
=A0
Thank You.
=A0

--20cf307f3bbee4e6dc04d490559f--