Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 93489D919 for ; Thu, 30 Aug 2012 12:53:04 +0000 (UTC) Received: (qmail 2354 invoked by uid 500); 30 Aug 2012 12:53:04 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 1980 invoked by uid 500); 30 Aug 2012 12:53:03 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 1904 invoked by uid 99); 30 Aug 2012 12:53:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 12:53:00 +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 jon@cloudera.com designates 209.85.212.41 as permitted sender) Received: from [209.85.212.41] (HELO mail-vb0-f41.google.com) (209.85.212.41) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 12:52:54 +0000 Received: by vbkv13 with SMTP id v13so2294657vbk.14 for ; Thu, 30 Aug 2012 05:52:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=9PZdUHQhhYBluZZuNPkYIxDXU52bLvPkmENgP3vIKNQ=; b=DjzW9+L9JBOczwmBQWVx5l4mmI36HD9MHl1d3Adx5ykWm4GV+36wUl351wFhTAZb0y SEEZO8n8qReqLk7mDdO9a2xH+T4IEBOTpLB60TSU+HdWU8Jwp0p9Dd9uprNUCRK8NBfG 6hdd++/E9jG5Py2R4wmmbHgVmRdCNxW+Ki41J89iNTpDknxpsM8+k1oJgrlzfVhh5xvk 1fodPp80LPqH0oPxHh/qDyrIstkKMh1idzQ9drAwSU4CkNkjLtu1a0O0C94vMJtSe7Pj 5nNd91bkIrIiCGWnxLXz4RsuhrF17W94oB3Wl3OKOg8pMh32AzK9vkrXIyNqjhm2roGe YYbw== Received: by 10.52.174.202 with SMTP id bu10mr2518347vdc.128.1346331153580; Thu, 30 Aug 2012 05:52:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.94.14 with HTTP; Thu, 30 Aug 2012 05:52:13 -0700 (PDT) In-Reply-To: <503f3839.03ca320a.46c2.0026SMTPIN_ADDED@mx.google.com> References: <503f3839.03ca320a.46c2.0026SMTPIN_ADDED@mx.google.com> From: Jonathan Hsieh Date: Thu, 30 Aug 2012 05:52:13 -0700 Message-ID: Subject: Re: Refactoring checkAndPut and checkAndDelete to use doMiniBatchMutation To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=bcaec51a8de628c3c404c87b267d X-Gm-Message-State: ALoCoQkl//DqzcKFoJs+ouKQurIKIVw4VJ7Zsr6YdM2s0oTr70L1YM8fGP988OozuF4mSkZ5dag4 --bcaec51a8de628c3c404c87b267d Content-Type: text/plain; charset=ISO-8859-1 Ram, +1 It would be great if the refactor made adding a "checkAndMututate" method trivial to add. This method would do an atomic check and set that and if successful allowed for atomic deletions and puts on the same row. (current api only allow checkAndDelete, checkAndPut, and batchMutate). Jon. On Thu, Aug 30, 2012 at 2:53 AM, Ramkrishna.S.Vasudevan < ramkrishna.vasudevan@huawei.com> wrote: > Hi > > > > Currently the checkAndPut and checkAndDelete api internally calls the > internalPut and internalDelete. May be we can just call > doMiniBatchMutation > only. This will help in future like if we have some hooks and the CP > handles certain cases in the doMiniBatchMutation the same can be done while > doing a put thro checkAndPut or while doing a delete thro checkAndDelete. > > > > If we are fine with this I can raise a JIRA and submit a patch which should > be a simple one. > > > > Regards > > Ram > > -- // Jonathan Hsieh (shay) // Software Engineer, Cloudera // jon@cloudera.com --bcaec51a8de628c3c404c87b267d--