Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-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 4262B177E5 for ; Wed, 7 Jan 2015 13:23:50 +0000 (UTC) Received: (qmail 39245 invoked by uid 500); 7 Jan 2015 13:23:46 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 39137 invoked by uid 500); 7 Jan 2015 13:23:46 -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 39127 invoked by uid 99); 7 Jan 2015 13:23:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2015 13:23:45 +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 shahab.yunus@gmail.com designates 209.85.215.44 as permitted sender) Received: from [209.85.215.44] (HELO mail-la0-f44.google.com) (209.85.215.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2015 13:23:20 +0000 Received: by mail-la0-f44.google.com with SMTP id gd6so3399754lab.3 for ; Wed, 07 Jan 2015 05:22:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=PG4/WJAy93bEodRcRBbIhxJRO9ht6v0Re/a92/DBLLU=; b=FiDdontIlG2ZisBYYUu7L24tGiEtTTP8+nfaEJFI0BZiYmZ3KLvMxQIpAqlWPYMIai vDqKgTSf9aQt4Y6kzz8PqljSn5BhF85oPI2/ulwKOu1a/0Ws4Z4VNXNeRzqvJTP9OYnK uhEWEmAaMd2tilzN6oxvu7fB33u0+iamzyq/+V41WpfVqkRyYkJD+ZhlNXN5VCNxOROA RLM9LWce6HDPPK0lWPqPHkxTUWLwVjDzNCWFdwcB30YAlOH8/UPyk3UKijpYu/HQG9Uh 6wgfRmO2chSXDGEAsl5T7HMLOfx2OHBNWcazBFEhyWaC5liT/sHkNC79dGjkAkJ7CDNZ j6fA== MIME-Version: 1.0 X-Received: by 10.153.5.1 with SMTP id ci1mr4311279lad.67.1420636954096; Wed, 07 Jan 2015 05:22:34 -0800 (PST) Received: by 10.25.39.76 with HTTP; Wed, 7 Jan 2015 05:22:34 -0800 (PST) In-Reply-To: References: Date: Wed, 7 Jan 2015 08:22:34 -0500 Message-ID: Subject: Re: Creation of an empty output directory in hadoop filesystem From: Shahab Yunus To: "user@hadoop.apache.org" Content-Type: multipart/alternative; boundary=001a1133a74e00fb94050c0fd146 X-Virus-Checked: Checked by ClamAV on apache.org --001a1133a74e00fb94050c0fd146 Content-Type: text/plain; charset=UTF-8 Vandana, Also, in the code that you attached, I see 2 compilation errors. How is it even compiling? Or am I missing something here? 1- The 'sum' is not declared in the Map class. 2- The 'sum' in the Reduce class, when written to the context needs to be IntWritable and not directly an int. Regards, Shahab On Wed, Jan 7, 2015 at 8:18 AM, Shahab Yunus wrote: > First try: > > You should use @Override annotation before map and reduce methods so they > are actually called. > > Like this: > *@Override* > public void map(LongWritable k,Text v,Context con)throws > IOException,InterruptedException > > {... > > Do same for 'reduce' method. > > Regards, > Shahab > > On Wed, Jan 7, 2015 at 7:58 AM, Vandana kumari > wrote: > >> >> >> On Wed, Jan 7, 2015 at 4:16 PM, saurabh chhajed >> wrote: >> >>> Can you attach .java file instead of .class ? >>> >>> On Wed, Jan 7, 2015 at 4:04 PM, Vandana kumari >>> wrote: >>> >>>> Hello all, >>>> >>>> I had written a kmer mapreduce program in java. There is no error in >>>> the program and while running it creates an output directory in hadoop file >>>> system but that directory is empty. >>>> Please help to resolve this issue. >>>> Input file(test.txt) and kmer.java is attached herewith. >>>> -- >>>> Thanks and regards >>>> Vandana kumari >>>> >>> >>> >>> >>> -- >>> >>> [image: --] >>> Saurabh Chhajed >>> [image: http://]saurzcode.in/ >>> >>> >>> >> >> >> >> -- >> Thanks and regards >> Vandana kumari >> > > --001a1133a74e00fb94050c0fd146 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Vandana,

Also, in the code that you att= ached, I see 2 compilation errors. How is it even compiling? Or am I missin= g something here?

1- The 'sum' is not declared i= n the Map class.
2- The 'sum' in the Reduce class, when w= ritten to the context needs to be IntWritable and not directly an int.

Regards,
Shahab

On Wed, Jan 7, 2015 at 8:18= AM, Shahab Yunus <shahab.yunus@gmail.com> wrote:
First try:

You should use @Override annotation before map and reduce methods so they = are actually called.

Like this:
@Override
=C2=A0public void map(LongWritable k,Text v,Context con)t= hrows IOException,InterruptedException

=C2=A0 =C2= =A0 =C2=A0 =C2=A0 {...

Do same for 'redu= ce' method.

Regards,
Shahab

On Wed, Jan 7, 2015 at 7:58 AM, Vandana kum= ari <kvandana1992@gmail.com> wrote:


<= div class=3D"gmail_quote">On Wed, Jan 7, 2015 at 4:16 PM, saurabh chhajed <= span dir=3D"ltr"><schhajed.iet@gmail.com> wrote:
Can you attach .java file instead of .class ?

= On Wed, Jan 7, 2015 at 4:04 PM, Vandana kumari <kvandana1992@gmail.co= m> wrote:
=
Hello all,

I had written a kmer mapreduce program in java. Ther= e is no error in the program and while running it creates an output directory in hadoop file system but that directory is empty.
Please help to resolve this issue= .
Input file(test.txt) and kmer.java is attached herewith.
--
Thanks and rega= rds
=C2=A0 Vandana kumari



--
<= tbody style=3D"margin:0px;padding:0px;border:0px;outline:0px;font-weight:in= herit;font-style:inherit;font-family:inherit;vertical-align:baseline">=C2=A0
3D"--"
Saurabh Chh= ajed
<= img alt=3D"http://" width=3D"0" height=3D"0" style=3D"margin:0px;padding:0p= x;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family= :inherit;vertical-align:baseline;display:block;width:0px;min-height:0px;ove= rflow:hidden">saurzcode.= in/
3D""
=
=C2=A0
=C2=A0



--
Thanks and regards=C2=A0 Vandana kumari


--001a1133a74e00fb94050c0fd146--