Re:Re: Re: Support HBase Increment and CheckAndMutate API

2016-05-04 Thread William
Hi James, Thanks a lot for your advice, I will give it a shot. William At 2016-05-04 23:34:19, "James Taylor" wrote: >Hi William, >Tephra is used in production for every CDAP customer[1], so it does have >production usage. If your scenario is OLTP, then transactional tables in >Phoenix i

Re: Re: Support HBase Increment and CheckAndMutate API

2016-05-04 Thread James Taylor
Hi William, Tephra is used in production for every CDAP customer[1], so it does have production usage. If your scenario is OLTP, then transactional tables in Phoenix is the way to go. I don't think having atomic increment and check and put add up to OLTP. I also don't think transactions would put

Re:Re: Support HBase Increment and CheckAndMutate API

2016-05-04 Thread William
Hi James, Thanks for your advice. I have thought of implementing it in standard SQL, for example: a) UPDATE tablename SET colA = colA + 10, colB = colB - 20 where pk = 1; or b) UPSERT INTO tableName (colA, colB) values (colA + 10, colB - 20) where pk = 1; At first, I chose a), because Up

Re: Support HBase Increment and CheckAndMutate API

2016-05-03 Thread James Taylor
Hi William, I'd recommend looking at supporting these HBase features through the standard SQL merge statement where they compile down to these native calls when possible. Also, with our transaction support, you can already do an increment atomically and retry if a conflict occurs. Thanks, James On

Support HBase Increment and CheckAndMutate API

2016-05-03 Thread William
Hi all, I am trying to support hbase Increment and checkAndPut/checkAndDelete in phoenix and have done with Increment by introducing a new statement INCREMENT. Grammar: INCREMENT tableName (column defs) VALUES() where expressions Because all increment operations can be stored in a sin