0
votes

Is there a simple way to recalculate some values after an insert occurs? I have a table with multiple column families, one of them statistical. I'd like to insert the original record and than have some HBase-specific facility to calculate the values offline - without blocking the insert.

Let's assume I put some files into an hbase table and want to have information about the number of lines in them and also the dates stored there.

I've been looking into RegionObserver and its preGet method. This solution works but I'm afraid it blocks the actual insert from occurring until the calculation is completed.

2

2 Answers

1
votes

use the postPut method. You can see a short introduction to HBase's coprocessors here

1
votes

Try apache Pig, this is best suited for stasticl calculations and can run in local as well as mapred mode

For more detail you can visit

http://pig.apache.com