Re: Using put for nullifying qualifiers

2012-05-23 Thread Kristoffer Sjögren
Gotcha. Columns are quite dynamic in my case, but since I need to fetch rows first anyways; a KeyOnlyFilter to first find them and then overwrite values will do just fine. Cheers, -Kristoffer

Re: Using put for nullifying qualifiers

2012-05-23 Thread Tom Brown
I didn't mean to set the version to null, I meant to include a revision of the column whose contents are empty. This empty revision will Still be returned by any gets on that row, but you can put code into your client that treats empty values as deleted. It's a bit of a hack, but it's the best I c

Re: Using put for nullifying qualifiers

2012-05-23 Thread Kristoffer Sjögren
Ted: Awesome. I can think of several use cases where this is useful, but im pretty stuck on 0.92 right now. I tried the null-version trick but must be doing something wrong. How do I set version to null on a column? Isnt version equal to the timestamp (primitive long)? Setting timestamp to 0 and

Re: Using put for nullifying qualifiers

2012-05-22 Thread Ted Yu
That's right. In HBase 0.94 and trunk, check out the following API in HRegion: public void mutateRowsWithLocks(Collection mutations, Collection rowsToLock) throws IOException { It allows you to combine Put's and Delete's for a single region, atomically. On Tue, May 22, 2012 at 1:22 PM, K

Re: Using put for nullifying qualifiers

2012-05-22 Thread Kristoffer Sjögren
Thanks, sounds like that should do it. So im guessing it is correct to assume that _all_ KeyValues added to a _single_ Put operation will either wholely succeed or wholely fail as long as they belong to the same row? On Tue, May 22, 2012 at 8:30 PM, Tom Brown wrote: > I don't think you can incl

Re: Using put for nullifying qualifiers

2012-05-22 Thread Tom Brown
I don't think you can include a delete with a put and keep it atomic. You could include a null version of the column with your put, though, for a similar effect. --Tom On Tue, May 22, 2012 at 10:55 AM, Kristoffer Sjögren wrote: > Hi > > I'm trying to use Put operations to replace ("set") already

Using put for nullifying qualifiers

2012-05-22 Thread Kristoffer Sjögren
Hi I'm trying to use Put operations to replace ("set") already existing rows by nullify certain columns and qualifiers as part of an Put operation. The reason I want to do this is 1) keep the operation atomic/consistent 2) avoid latency from first doing Delete then Put. Is there some way to do t