hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dagaev <michael.dag...@gmail.com>
Subject Re: Question on RowLock
Date Mon, 16 Feb 2009 17:27:31 GMT
Thank you, Stack. I got it now :)
M.

On Mon, Feb 16, 2009 at 6:28 PM, stack <stack@duboce.net> 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 <michael.dagaev@gmail.com>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.
>>
>

Mime
View raw message