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 04A42D1D7 for ; Mon, 2 Jul 2012 14:04:01 +0000 (UTC) Received: (qmail 24916 invoked by uid 500); 2 Jul 2012 14:04:00 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 24641 invoked by uid 500); 2 Jul 2012 14:04:00 -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 24621 invoked by uid 99); 2 Jul 2012 14:03:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2012 14:03:59 +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 (athena.apache.org: domain of hbase.project@gmail.com designates 209.85.213.52 as permitted sender) Received: from [209.85.213.52] (HELO mail-yw0-f52.google.com) (209.85.213.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2012 14:03:54 +0000 Received: by yhpp61 with SMTP id p61so5333156yhp.11 for ; Mon, 02 Jul 2012 07:03:33 -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 :content-type; bh=DfChb7cJl5SFczjp1DeguUA7JCy4Ids1bQfoK+v2PzA=; b=URUb6MLsXKT/BkCRM5k91+uYtidE8cdZTyC9yv16ZdA4NYhZB3ot7twllAa2L+VE/A umJkf9KsYj4E2GxM2GP1Vp11/Tm35YdsxmDzad83vUWwGA6m3wE0HeFvEZDF7Tyndo+U 74csQjSHD+bBJbiMceOMeet/gxrP79r92uT/NvxhWH7sngJP5Bn6d7J/uW5rV8deEFjk j2D6VJzxNhJ3FmVn9Icq72DRXTQDpMW+otv8pHQxps+ZwWDw8crV+OINweR3Kyzf1H60 zIW8eLgMB95/iw9sUk7BF/qAZ4sqt8EvzRyKNovz3ZX1ewaJRAYbAKogE5rMRI6M6MlE 9t3A== MIME-Version: 1.0 Received: by 10.50.186.162 with SMTP id fl2mr5401169igc.44.1341237813527; Mon, 02 Jul 2012 07:03:33 -0700 (PDT) Received: by 10.64.65.38 with HTTP; Mon, 2 Jul 2012 07:03:32 -0700 (PDT) In-Reply-To: <4ff15fb6.61e5440a.16f3.ffffdcb2SMTPIN_ADDED@mx.google.com> References: <4ff15fb6.61e5440a.16f3.ffffdcb2SMTPIN_ADDED@mx.google.com> Date: Mon, 2 Jul 2012 10:03:32 -0400 Message-ID: Subject: Re: checkAndPut, checkAndDelete From: Dishant A To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=14dae9340f396f438004c3d9437a X-Virus-Checked: Checked by ClamAV on apache.org --14dae9340f396f438004c3d9437a Content-Type: text/plain; charset=ISO-8859-1 Hi Ram, 1) Can you do this check on client side? You can't, because this operation is supposed to be atomic and if you do a get and the value changes on server side in the meantime, you will be doing it wrong. 2) Can we just use the row that is stuffed inside the Put/Delete? (Anyway this change will be an api change). This lose the case when you want to check the value of column A and based on it change the value of column B. So again we can't. Hope this helps. Thanks, Dishant On Mon, Jul 2, 2012 at 4:44 AM, Ramkrishna.S.Vasudevan < ramkrishna.vasudevan@huawei.com> wrote: > Hi Devs > > > > Currently the checkAndPut, checkAndDelete these api currently accept the > row > that needs to be checked and the Delete/Put also along with it. > > > > Again internally in the code HRegion.checkAndMutate() there is a > verification to find if the row passed and the one inside the > Mutate(Put/Delete) object are same. If not throw an exception. > > > > 1) Can we do this check on the client side itself? > > 2) Can we just use the row that is stuffed inside the Put/Delete? > (Anyway this change will be an api change). > > > > Pls correct me if am missing something here. > > > > Regards > > Ram > > > > > > > > > > --14dae9340f396f438004c3d9437a--