I'm running a sample code I wrote to test HBase lockRow() and
unlockRow() methods.
The sample code is below:
HTable table = new HTable(config, "test");
RowLock rowLock = table.lockRow(Bytes.toBytes(row));
System.out.println("Obtained rowlock on " + row + "\nRowLock: " + rowLock);
Put p = new Put(
You're using 0.94, right ?
RowLock has been dropped since 0.96.0
Can you tell us more about your use case ?
On Thu, Feb 27, 2014 at 9:56 PM, Shailesh Samudrala
wrote:
> I'm running a sample code I wrote to test HBase lockRow() and unlockRow()
> methods.
> The sample code is below:
>
> HTable
The version I'm using is 0.90.6.
We are trying to implement rowLock & rowUnLock on a HBase table to support
our multi-operation transactions on a JSON object(receive value from user
-> read HBase row -> calculate new value based on received value and
current value in HBase -> put new Value to HBas
In newer releases, there are multiple mechanisms where your scenario can be
implemented.
Please consider upgrading your deployment.
Some references:
https://blogs.apache.org/hbase/entry/coprocessor_introduction
src/main/java/org/apache/hadoop/hbase/coprocessor/MultiRowMutationEndpoint.java
(0.94)
Hi Ted,
Thank you for the references. Unfortunately, the next planned environment
upgrade is towards the 2nd half of this year. Also, the transactions I
talked about in my earlier email have already been implemented & we are
currently trying to eliminate possibilities for multiple processes
perfor