Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-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 15A20DCC2 for ; Tue, 19 Jun 2012 19:16:35 +0000 (UTC) Received: (qmail 86110 invoked by uid 500); 19 Jun 2012 19:11:05 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 64537 invoked by uid 500); 19 Jun 2012 19:09:41 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 51682 invoked by uid 99); 19 Jun 2012 16:56:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2012 16:56:15 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jdcryans@gmail.com designates 209.85.160.169 as permitted sender) Received: from [209.85.160.169] (HELO mail-gh0-f169.google.com) (209.85.160.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2012 16:56:08 +0000 Received: by ghrr18 with SMTP id r18so6073126ghr.14 for ; Tue, 19 Jun 2012 09:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=9nl479EHA8LitFItLQbJPOLt4pC6j8xK8UFlTNJZgYw=; b=YHSNtuEKLyM+L+5eUCmAp5X047dVY2pgQgsnbBzo5guVYmp/ndplDfyGyBUORIT39t dZUgGkaR0k3ZuJrEgtxpaWvKOeJyVoFjOaVH5l1fA3QVsW4Q9vHjF3wJk73zKD0T4uT4 5pRHVUrLfUZ5D1BVnxNc43QCwiKH+ttkCHqSCkXtxPZHipxgOHDL+oaqeXoUnOVudncf zt27N2JyAUD7W7M5e06HrQKeBNuX37/BS1f6fYzOBDH0h2txF2visA++GVuG0/pPEFDr 35L7fuIBbvJ/zfyOCzkyhH+SMSka5GsTZfBE2tGSvwaBGxVNOUoT5aSVGwMazevc+LS1 hk0w== MIME-Version: 1.0 Received: by 10.236.154.69 with SMTP id g45mr23377185yhk.47.1340124947234; Tue, 19 Jun 2012 09:55:47 -0700 (PDT) Sender: jdcryans@gmail.com Received: by 10.101.188.9 with HTTP; Tue, 19 Jun 2012 09:55:47 -0700 (PDT) In-Reply-To: References: Date: Tue, 19 Jun 2012 09:55:47 -0700 X-Google-Sender-Auth: HUZc4W5STRgUtf_9ofdroltmAzw Message-ID: Subject: Re: Increment Counters in HBase during MapReduce From: Jean-Daniel Cryans To: user@hbase.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This question was answered here already: http://mail-archives.apache.org/mod_mbox/hbase-user/201101.mbox/%3CAANLkTin= nW2d7DMCyFu3ptv1Hu_i3XqK_1pDSgD5NT_Lk@mail.gmail.com%3E Counters are not idempotent, this can be hard to manage. J-D On Mon, Jun 18, 2012 at 5:49 PM, Sid Kumar wrote: > Hi everyone, > > =A0 =A0I have a use case in HBase that I was wondering if someone may hav= e > stumbled upon. I am maintaining an ad impressions table with columns that > are counters for certain metrics. I started using the incrementColumnValu= e > method part of the HTable API to update these metrics and that works grea= t. > =A0 =A0I was wondering if this function could be used from a MapReduce jo= b. > The TableOutputFormat supports only Delete and Put operations. Using the > Incremental counters saves me from doing any aggregations in my Map Reduc= e > code. Ideally i would like to just call this function in my mapper and > wouldn't even need a Reducer. > =A0 =A0Has anyone run into this use case? I would also love to know if th= ere > are any better alternatives of solving this too. Any info would be great. > > Thanks > Sid