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 5F07D18B20 for ; Fri, 18 Mar 2016 10:31:31 +0000 (UTC) Received: (qmail 51408 invoked by uid 500); 18 Mar 2016 10:31:29 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 51344 invoked by uid 500); 18 Mar 2016 10:31:29 -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 51332 invoked by uid 99); 18 Mar 2016 10:31:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Mar 2016 10:31:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6CDBAC0221 for ; Fri, 18 Mar 2016 10:31:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id M_iN_Rd6mZJu for ; Fri, 18 Mar 2016 10:31:28 +0000 (UTC) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 295815F22F for ; Fri, 18 Mar 2016 10:31:27 +0000 (UTC) Received: by mail-lf0-f42.google.com with SMTP id v130so34567648lfd.2 for ; Fri, 18 Mar 2016 03:31:27 -0700 (PDT) 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; bh=ClasW73NpXgjBhx412tmTxL0Q9X/BJwXjA8PTDcjAA0=; b=KFqQkFoRFBs/vr+H6MQX9cA/Dx+VeIBHdcry2xW4fpdEwe2sNewgCYeYlyf8d+FqjN wzD36/LiKNVtYRO5UKJ3FCeMwKCUqkMqWzIHORqNuEQKigQGYQyW/MO9UIu1d1Gx3Aor BleZhFk/iMRN7vkE+1BSZpt9eic3iwWB2uM7oDcSumzuJ1Doe/orafieHyQEJ54+dhkY arhBAHIytgkzak38jSnT7sRSzufzlvUAOmhG0zmcelw18xBI2NT2brja8j+a93XIHa7U A0a4Yw1g9oe6ARWNp3RAByKHzggLPXT5eHPwYdBZMOZJk4cTvfLeL8SCfclNg86RgRVJ MY1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=ClasW73NpXgjBhx412tmTxL0Q9X/BJwXjA8PTDcjAA0=; b=c/863gq9C7AL7VLxt6Qj0YiaJTvvpcMJD1cxJzh3c0k6qtF09PtYJumMgUopJsmGBt 1s5rmqbVrbrt6KEzb2SrGVWtvc4IUxhqtQb3bIlGtsaDb6PfzqT+TqCPiPOiAZ4a7MaM bOtQT6koSSEvg2WFXPmT9jTWcBlNeHOACOfRi3rPSW890Evs4WagnJekCoz9SM2JBY8N eDTwfIulapfiECi9txDD8fiG9YRYg8BiJeGJPdb9QBEaaJ6L+uvYQ8stNLZy4Nkk80Fd h/YwvDTmFKCLoM6ojXkVtHBIpc/HhCNS/hiPm44MTeWr+Vaf7UKITWnX4OM9vZfCfFsj 0VEw== X-Gm-Message-State: AD7BkJLk1vLoJCH2vYMAaIjge5s135fHCp4iqFu8LesXhoaOMd9Cve8TY5VWwGPIXv6Kksr1yFvHndFvnsBcqA== MIME-Version: 1.0 X-Received: by 10.25.158.136 with SMTP id h130mr5589115lfe.108.1458297080154; Fri, 18 Mar 2016 03:31:20 -0700 (PDT) Received: by 10.112.235.35 with HTTP; Fri, 18 Mar 2016 03:31:20 -0700 (PDT) In-Reply-To: References: Date: Fri, 18 Mar 2016 16:01:20 +0530 Message-ID: Subject: Re: How to implement increment in an idempotent manner From: Sreeram To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=001a113db368708fed052e503fb0 --001a113db368708fed052e503fb0 Content-Type: text/plain; charset=UTF-8 All my Hbase processing is going to be inside any given bolt. So I cannot use the second option. On Fri, Mar 18, 2016 at 3:46 PM, Jean-Marc Spaggiari < jean-marc@spaggiari.org> wrote: > What's about the other option where each bolt increment it's own column and > at theend ou aggregate those few columns together? > > 2016-03-18 6:14 GMT-04:00 Sreeram : > > > The incremented field is more like an amount field that will be storing > the > > aggregate amount. Since the field will be incremented concurrently by > > multiple bolts running in parallel, storing the value before increment > and > > then doing a put in case of replay will not help. > > > > Reason to have this field is to pre-compute a certain aggregate amount > and > > materialize it in the Hbase table. > > > > On Fri, Mar 18, 2016 at 3:30 PM, Jean-Marc Spaggiari < > > jean-marc@spaggiari.org> wrote: > > > > > At the beginning of your Storm bolt process can you not do a put of > "0"? > > So > > > it start back from scratch? Or else you will need to query the value, > and > > > keep the value to put it back if you need to replay your bolt > > > > > > Other option is, you increment a specific difference column and at the > > end > > > if you are successful with your bolt you increment te initial column > with > > > the new total counter? > > > > > > JMS > > > > > > 2016-03-18 5:33 GMT-04:00 Sreeram : > > > > > > > Hi, > > > > > > > > I am looking for suggestions from community on implementing HBase > > > > increment in a idempotent manner. > > > > > > > > My use case is a storm Hbase bolt that atomically increments a HBase > > > > counter. Replay of the storm bolt results in a double increment. > > > > > > > > Any suggestion on the approach to be taken is welcome. > > > > > > > > Thank you. > > > > > > > > Regards, > > > > Sreeram > > > > > > > > > > --001a113db368708fed052e503fb0--