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 B1BE010909 for ; Thu, 7 Nov 2013 06:10:05 +0000 (UTC) Received: (qmail 86540 invoked by uid 500); 7 Nov 2013 06:09:57 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 86471 invoked by uid 500); 7 Nov 2013 06:09:56 -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 86459 invoked by uid 99); 7 Nov 2013 06:09:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Nov 2013 06:09:56 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sonalgoyal4@gmail.com designates 209.85.217.172 as permitted sender) Received: from [209.85.217.172] (HELO mail-lb0-f172.google.com) (209.85.217.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Nov 2013 06:09:50 +0000 Received: by mail-lb0-f172.google.com with SMTP id c11so67465lbj.17 for ; Wed, 06 Nov 2013 22:09:30 -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=0LtK73W4jDqFbYAw98Mu6Ooc6Jwx65tzTHuQP7sYIis=; b=y4FRlnVwRLYoFaI1m+ONRa8HrGVR1wBSg6BTzLwkU7ARBKf/8JTnbqFbO/WO+EwnJ9 if40Y32srKoCNdR9e2T8yL2hjBT2HXIh6oSTbcxej/hk0WzY/5e6rkjpozs0/evZfO22 p6D9UgXsFKNx+Vci8b7zjm1xAYjN/8ZHKouigqs9KHrFdJA1jJPbEX5yUSa2Pxqt+XVM fW+5jwKzX2m3JKbU+nZ5BgRa80ZIOOS+T5JtIzqABb+v/SvFk7+GtyiH6g8M5DfQeugf o2B4B4D234Wfrty2Ih560kvMvD4zIY9xWrcognoAK1UCqQPt0dAxxiW4VpnwSc3wjE5z Wx5A== MIME-Version: 1.0 X-Received: by 10.152.22.97 with SMTP id c1mr4977852laf.31.1383804570315; Wed, 06 Nov 2013 22:09:30 -0800 (PST) Received: by 10.114.175.37 with HTTP; Wed, 6 Nov 2013 22:09:30 -0800 (PST) In-Reply-To: References: Date: Thu, 7 Nov 2013 11:39:30 +0530 Message-ID: Subject: Re: Mapper input as argument From: Sonal Goyal To: "user@hadoop.apache.org" Content-Type: multipart/alternative; boundary=089e0158b86ada31eb04ea901b6b X-Virus-Checked: Checked by ClamAV on apache.org --089e0158b86ada31eb04ea901b6b Content-Type: text/plain; charset=ISO-8859-1 Hi Unmesha, What is the computation you are trying to do? If you are interested in computing over multiple lines instead of a single line, have a look at NLineInputFormat. Best Regards, Sonal Nube Technologies On Thu, Nov 7, 2013 at 11:35 AM, unmesha sreeveni wrote: > one more doubt : how to copy each input split entering into mapper into a > file for computation? > > > On Thu, Nov 7, 2013 at 10:35 AM, unmesha sreeveni wrote: > >> My driver code is >> FileInputFormat.setInputPaths(job, new Path(args[0])); >> FileOutputFormat.setOutputPath(job,new Path(args[1])); >> >> and My mapper is >> public void map(Object key, Text value, Context context) >> throws IOException, InterruptedException { >> where value.tostring() contains my input data. >> >> is that a better way to copy all the data s coming into a file and do >> computations. OR read each line and do the calculation. >> >> -- >> *Thanks & Regards* >> >> Unmesha Sreeveni U.B >> >> *Junior Developer* >> >> >> >> > > > -- > *Thanks & Regards* > > Unmesha Sreeveni U.B > > *Junior Developer* > > *Amrita Center For Cyber Security * > > > * Amritapuri.www.amrita.edu/cyber/ * > --089e0158b86ada31eb04ea901b6b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Unmesha,

What is the computation you= are trying to do? If you are interested in computing over multiple lines i= nstead of a single line, have a look at NLineInputFormat.=A0

Best Regards,
Sonal
Nube Technologies=A0






On Thu, Nov 7, 2013 at 11:35 AM, unmesha= sreeveni <unmeshabiju@gmail.com> wrote:
one more doubt : how to copy each input split entering into map= per into a file for computation?


On Thu, Nov 7, 2013 at 10:35 AM, unmesha sreeveni <unmeshabiju@gmail.c= om> wrote:
My driver code is=A0
=A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 FileInputFormat.setInputPaths(job, new Path(args[0]));<= /div>
FileOutputFormat.setOutputPath(job,new P= ath(args[1]));

and My mapper is=A0
=A0 =A0 =A0 =A0 public void map(Object key, Text value, Conte= xt context)
throws IOExcept= ion, InterruptedException {
where value= .tostring() contains my input data.

is that a better way to copy all the data s coming into a file and do comp= utations. OR read each line and do the calculation.

--
Thanks & Regards

Unmesha Sreeveni U.B
Junior Developer





--
=
Tha= nks & Regards

Unmesha Sreeveni U.B
Junior Developer
Amrita Center For Cyber Security

--089e0158b86ada31eb04ea901b6b--