You could add an "isLocked" column to your row. When you want to lock or update your row then use checkAndPut and check that "isLocked"=0. When unlocking your row then checkAndPut that "isLocked"=1. You will have effectively locked the row for the purposes of your application without affecting HBase internal workings like performing a region split.
Chris I want a distributed lock condition for doing certain operations that may or may not be unrelated to hbase. On Thu, Aug 29, 2013 at 12:18 AM, Ted Yu <[email protected]> wrote: > RowLock API has been removed in 0.96. > > Can you tell us your use case ? > > > On Wed, Aug 28, 2013 at 3:14 PM, Kristoffer Sjögren <[email protected] > >wrote: > > > Hi > > > > About the internals of locking a row in hbase. > > > > Does hbase row locks map one-to-one with a locks in zookeeper or are > there > > any optimizations based on the fact that a row only exist on a single > > machine? > > > > Cheers, > > -Kristoffer > > >
