RE: checkAnd...

2013-05-15 Thread Liu, Raymond
How about this one : https://issues.apache.org/jira/browse/HBASE-8542 Best Regards, Raymond Liu > -Original Message- > From: Lior Schachter [mailto:lior...@gmail.com] > Sent: Thursday, May 16, 2013 1:18 AM > To: user > Subject: Re: checkAnd... > > yes, I believe th

Re: checkAnd...

2013-05-15 Thread Lior Schachter
r Schachter > To: user , > Date: 04/27/2013 10:31 AM > Subject:Re: checkAnd... > > > > found the checkAndIncrement Jira - > HBASE-6712<https://issues.apache.org/jira/browse/HBASE-6712> > . > Would be nice to have also checkandAppend. > > Any

Re: checkAnd...

2013-05-14 Thread Mike Spreitzer
Why not go whole hog and create checkAndMultiMutate (for all varieties of mutation) (all on the same row)? Thanks, Mike From: Lior Schachter To: user , Date: 04/27/2013 10:31 AM Subject:Re: checkAnd... found the checkAndIncrement Jira - HBASE-6712<ht

Re: checkAnd...

2013-04-30 Thread Lior Schachter
Hi, We have a simple HBase schema: row key = subscriber id. Column family A = counters - all kinds of aggregations. Events records have a UUID, in some scenarios we might get duplicate events. We should not count the duplicates. A possible solution was to keep event ids as qualifiers in another C

Re: checkAnd...

2013-04-28 Thread Asaf Mesika
Yep. You can write a RegionObserver which take all event qualifiers with a time stamp larger than a certain grace period, sum it up, add it to the current value of the Count qualifier and emits an updated Count qualifier. I wrote something very similar for us at Akamai and it improved throughput by

Re: Multi-CheckAnd...

2013-04-28 Thread Em
specifically. I'm sure > somebody will step up and make a patch (unless you want to work on a patch :) > ). > > -- Lars > > > > > From: Em > To: "user@hbase.apache.org" > Sent: Saturday, April 27, 2013 8:09 AM

Re: Multi-CheckAnd...

2013-04-28 Thread Em
Hi, my API was not correct. It has to look like this (forgot the "value"-param): public boolean[] multiCheckAndPut(byte[]row, byte[] family, byte[] column, byte[] value, List puts); > In the API you described, what is the meaning for first parameter, row ? > Are the puts allowed to write into

Re: Multi-CheckAnd...

2013-04-27 Thread Ted Yu
_ > From: Em > To: "user@hbase.apache.org" > Sent: Saturday, April 27, 2013 8:09 AM > Subject: Multi-CheckAnd... > > > Hello list, > > I was wondering how to create a multi-row-mutation with > precondition-constraints. > > Something like this: >

Re: Multi-CheckAnd...

2013-04-27 Thread lars hofhansl
ou want to work on a patch :) ). -- Lars From: Em To: "user@hbase.apache.org" Sent: Saturday, April 27, 2013 8:09 AM Subject: Multi-CheckAnd... Hello list, I was wondering how to create a multi-row-mutation with precondition-constraints.

Re: Multi-CheckAnd...

2013-04-27 Thread Ted Yu
In the API you described, what is the meaning for first parameter, row ? Are the puts allowed to write into rows with row keys other than that specified by row ? I am asking because potentially the rowkey range implied by puts may span beyond one region. If that is the case, HBase doesn't support

Re: checkAnd...

2013-04-27 Thread Ted Yu
It would be nice to know a bit more about your schema. How many tables do you use in the scenario you described ? One for user (counter), one for event ? Or just one table for all related information ? bq. to have an event_id qualifier for each incoming event Would you store the event_id informa

Multi-CheckAnd...

2013-04-27 Thread Em
Hello list, I was wondering how to create a multi-row-mutation with precondition-constraints. Something like this: public boolean[] multiCheckAndPut(byte[]row, byte[] family, byte[] column, List puts); This looks a little bit ugly but illustrates the idea. Are there any alternatives that would

Re: checkAnd...

2013-04-27 Thread Lior Schachter
found the checkAndIncrement Jira - HBASE-6712 . Would be nice to have also checkandAppend. Any ideas how to solve to the use case I described ? On Sat, Apr 27, 2013 at 4:46 PM, Jean-Marc Spaggiari < jean-m...@spaggiari.org> wrote: > Hi Ted, > >

Re: checkAnd...

2013-04-27 Thread Jean-Marc Spaggiari
Hi Ted, Will it be a good idea to add it? Should we open a JIRA and implement checkANDIncrement? Might be pretty simple. JM 2013/4/27 Ted Yu : > Take a look at the following method in HRegionServer: > > public boolean checkAndPut(final byte[] regionName, final byte[] row, > final byte[]

Re: checkAnd...

2013-04-27 Thread Lior Schachter
Hi Ted, Thanks for the prompt response. I've already had a look at HRegionServer.checkAndPut and the implementation looks quite straight forward. That's why I was wondering why the other 2 methods are not available...or planned (couldn't find Jira). Seems like a useful functionality. Anyhow, I'm n

Re: checkAnd...

2013-04-27 Thread Ted Yu
Take a look at the following method in HRegionServer: public boolean checkAndPut(final byte[] regionName, final byte[] row, final byte[] family, final byte[] qualifier, final byte[] value, final Put put) throws IOException { You can create checkAndIncrement() in a similar way. Chee

checkAnd...

2013-04-27 Thread Lior Schachter
Hi, I want to increment a cell value only after checking a condition on another cell. I could find checkAndPut/checkAndDelete on HTableInteface. It seems that checkAndIncrement (and checkAndAppend) are missing. Can you suggest a workaround for my use-case ? working with version 0.94.5. Thanks, L