Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # dev >> Question on Coprocessors and Atomicity


Copy link to this message
-
Question on Coprocessors and Atomicity
I'm looking at the preCheckAndPut / postCheckAndPut api with
coprocessors and I'm wondering ... are these pre/post checks done
_after_ taking the row lock or is the row lock only done within the
checkAndPut api.

I'm interested in seeing if we can implement something like:
(in pseudo sql)
update table-name
set column-name = new-value
where (column-value - new-value) > threshold-value

Basically ... I want to enhance the checkAndPut to not just compare
"values" ... but apply an arbitrary function on the value _atomically_
in the Put call. Multiple threads would be firing these mutations and
I'd like the threshold-value above to never be breached under any
circumstance.

Is there a solution that can be implemented either via checkAndPut or
using coprocessors preCheckAndPut? If not, would this be a useful
feature to build in HBase?

Thanks,
--Suraj
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB