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 0D7FA90B1 for ; Tue, 10 Jul 2012 23:06:07 +0000 (UTC) Received: (qmail 6240 invoked by uid 500); 10 Jul 2012 23:06:05 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 6175 invoked by uid 500); 10 Jul 2012 23:06:05 -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 6163 invoked by uid 99); 10 Jul 2012 23:06:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jul 2012 23:06:05 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FSL_RCVD_USER,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pablo@psafe.com designates 187.0.212.22 as permitted sender) Received: from [187.0.212.22] (HELO aherelay01.exch.emailtotal.com.br) (187.0.212.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jul 2012 23:05:58 +0000 Received: from exchange.emailtotal.com.br (ahecas01.email.total [187.0.212.18]) by aherelay01.exch.emailtotal.com.br (Postfix) with ESMTP id 5737B18225 for ; Tue, 10 Jul 2012 20:05:35 -0300 (BRT) Received: from exchange.email.total ([fe80::f198:3717:5313:7fe8]) by ahecas01.email.total ([fe80::e82d:d71b:9a94:21f6%10]) with mapi; Tue, 10 Jul 2012 20:05:28 -0300 From: Pablo Musa To: "mapreduce-user@hadoop.apache.org" Date: Tue, 10 Jul 2012 20:06:19 -0300 Subject: RE: Writting to HBASE in map phase Thread-Topic: Writting to HBASE in map phase Thread-Index: Ac1e2qoxf4paDGltQWu6v4A0Q2Nd3QAFd9Kg Message-ID: References: In-Reply-To: Accept-Language: pt-BR Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: pt-BR Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Great, Thank you very much! Abs, Pablo -----Original Message----- From: Harsh J [mailto:harsh@cloudera.com]=20 Sent: ter=E7a-feira, 10 de julho de 2012 17:28 To: mapreduce-user@hadoop.apache.org Subject: Re: Writting to HBASE in map phase Hi Pablo, Just set your number of reduces to zero, and your TableOutputFormat will au= tomatically kick in at the Map stage, i.e., just add the below to your driv= er before you submit the job. You need no other changes. job.setNumReduceTasks(0); On Wed, Jul 11, 2012 at 1:53 AM, Pablo Musa wrote: > Hey guys, > > I need to update a field in an HBASE table and I want to do a mapred=20 > job for that. > > I can do it using both map and red phase. However, it does not make=20 > any sense > > to me, since map will pass the "Result" it is receiving to the reduce pha= se. > > > > I also read in the hbase mailing list someone saying that you do not=20 > need the reduce, > > which I agree. However I do not know, and did not find any hints on=20 > configuring > > the map phase to write into HBASE. > > > > I could use the HBASE API and write into the table, but I am not sure=20 > it is a good idea. > > > > Thanks, > > Pablo -- Harsh J