Return-Path: Delivered-To: apmail-hadoop-hbase-user-archive@minotaur.apache.org Received: (qmail 45672 invoked from network); 16 Feb 2009 17:28:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2009 17:28:02 -0000 Received: (qmail 89660 invoked by uid 500); 16 Feb 2009 17:28:00 -0000 Delivered-To: apmail-hadoop-hbase-user-archive@hadoop.apache.org Received: (qmail 89633 invoked by uid 500); 16 Feb 2009 17:28:00 -0000 Mailing-List: contact hbase-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-user@hadoop.apache.org Delivered-To: mailing list hbase-user@hadoop.apache.org Received: (qmail 89622 invoked by uid 99); 16 Feb 2009 17:28:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Feb 2009 09:28:00 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of michael.dagaev@gmail.com designates 209.85.218.167 as permitted sender) Received: from [209.85.218.167] (HELO mail-bw0-f167.google.com) (209.85.218.167) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Feb 2009 17:27:52 +0000 Received: by bwz11 with SMTP id 11so3354280bwz.5 for ; Mon, 16 Feb 2009 09:27:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=zqfts6yqpci7INcoFwSXIRk2MHrLuCu0uFDnNLrL734=; b=PGps4jR8Q5EnlqSuzFE0WrTSg1wCvW1X+Sc/SmitLxRDK2timhIs9HxFdqsEdvhFal RESxO/pFabUDUlL47pK4CVVMgWfdbyLDgcbRSegPKpx7GLdDLWc6b7FN/p7bgcvWodQ3 7AinzUEqqXLfBAkiDACLpUybXXmWVUfwS0rj4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ldRQUi4bIxigr5ZIQiG7HrVsLTsDDqEec4JnblcEgyoMyjUSCcM/Cem64pSgBr7CvL SrkgDkbA9NRSCktu4sJKh3CT1fRCxdPGyshdXU6W25MqHyQzjYAK5IRNEls6NUpSdxbk 0hhuo127HIYfGSTR6KqGEBLcg8dsCiFaMA91U= MIME-Version: 1.0 Received: by 10.223.108.71 with SMTP id e7mr2092614fap.33.1234805251866; Mon, 16 Feb 2009 09:27:31 -0800 (PST) In-Reply-To: <7c962aed0902160828x77c169eyff99c5df0c018c67@mail.gmail.com> References: <2f81e00902160807y35ccb4abp168a3dbed7b7ec51@mail.gmail.com> <7c962aed0902160828x77c169eyff99c5df0c018c67@mail.gmail.com> Date: Mon, 16 Feb 2009 19:27:31 +0200 Message-ID: <2f81e00902160927u6ba1ee1fh8abf07a46da60794@mail.gmail.com> Subject: Re: Question on RowLock From: Michael Dagaev To: hbase-user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Thank you, Stack. I got it now :) M. On Mon, Feb 16, 2009 at 6:28 PM, stack wrote: > See how you can lock a row -- it returns a RowLock instance -- here > http://hadoop.apache.org/hbase/docs/r0.19.0/api/org/apache/hadoop/hbase/client/HTable.html#lockRow(byte[]). > Then see how elsewhere in HTable, all operations optionally take a RowLock > instance. Unlock the row when done using this method: > http://hadoop.apache.org/hbase/docs/r0.19.0/api/org/apache/hadoop/hbase/client/HTable.html#unlockRow(org.apache.hadoop.hbase.client.RowLock) > . > > A single server at any one time will be hosting the region that contains the > row you are locking. When you get a RowLock its held by this host. Ergo, > no need for it to be distributed. > > St.Ack > > > On Mon, Feb 16, 2009 at 8:07 AM, Michael Dagaev wrote: > >> Hi, all >> >> Is this class intended for public use? >> >> Can I use it to lock a row, read and update the row data >> and unlock the row ? I guess it is not a distributed lock I need >> but I want to be sure ... >> >> What I need is a some way to lock a row, read and update the data >> and unlock the row after the update. >> >> Thank you for your cooperation, >> M. >> >