If you want the delete and new row put in a single transaction, (well that is the best thing to do) you can try using mutateRow(final RowMutations rm) Add a delete row mutation followed by a Put
You should be careful ab the timestamp of 2 Mutations. You should provide ts from client side. May be do like give System cur time for Put and curTime - 1 for Delete. (Make sure delete marker wont mark new put cells also) Note : I have not tried with a sample test. You can experiment. -Anoop- On Thu, Nov 20, 2014 at 4:16 PM, Sznajder ForMailingList < [email protected]> wrote: > Hi Nick > > Many thanks for your rapid answer! > > By "unpredictable results", I mean that I do not get the expected value in > the row, after the new Put call (after Delete). > > I tried to call a delete before a put (see the attached file) > > And I get some weird results: after iterations, I start to get some "empty > content". > > Apparently, "Delete" and "Put" on a same key are not well supported.... > > Benjamin > > On Thu, Nov 20, 2014 at 11:40 AM, Nick Dimiduk <[email protected]> wrote: > >> What does "unpredictable results" mean? If you know all the existing >> qualifiers, just provide new values of all of them in a single put. If you >> don't, you can use a delete family marker to clear visibility of an entire >> family. I think you'll need to do this separately from writing the new >> values. >> >> On Thu, Nov 20, 2014 at 9:17 AM, Sznajder ForMailingList < >> [email protected]> wrote: >> >> > Hi, >> > >> > I would like to **replace** the whole content of a Row in HBase by some >> new >> > content. >> > However: >> > * Simple *put* call just replaces the cells in the new put row. >> > * I thought to call Delete and then Put, and I get some very >> unpredictable >> > results... >> > >> > Is there a solution for replacing the whole content of a Row? >> > >> > Many thanks! >> > >> > Benjamin >> > >> > >
