Oh, oops, I misread increments documentation. I'm fine with that. The only problem now then is that it only operates on longs, but I'm storing ints and shorts to save space. Perhaps the space saving isn't worth the cost of not using this though.
Marco -- Marco Gallotta | Mountain View, California Software Engineer, Infrastructure | Loki Studios fb.me/marco.gallotta | twitter.com/marcog ma...@gallotta.co.za | +1 (650) 417-3313 Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Tuesday 24 July 2012 at 3:34 PM, Jean-Daniel Cryans wrote: > On Tue, Jul 24, 2012 at 3:29 PM, Marco Gallotta <ma...@gallotta.co.za > (mailto:ma...@gallotta.co.za)> wrote: > > I acquire the lock before the get. I only setup the get before acquiring > > the lock. > > > Yes, but let's say you want to increment "f:a" and "f:b" in the row > "example". Your code requires 2 calls to increment() and would be seen > as two different puts so a reader could see "f:a" incremented but not > "f:b". It's the same for HBase's increment function, except it's going > to be much faster and won't suffer row lock problems. > > J-D