Getting started with HBase Coprocoessors - Observers
HBase 0.92 release provides coprocessors functionality which includes observers (similar to triggers for certain events) and endpoints (similar to stored procedures to be invoked from the client). Observers can be at the region, master or at the WAL (Write Ahead Log) level. In this blog entry we will create a Region Observer. Once a Region Observer has been created, it can specified in the hbase-default.xml which applies to all the regions and the tables in it or else the Region Observer can be specified on a table in which case it applies only to that table. Make sure that HBase is restarted after following the below steps for the coprocessor to be executed. Excellent introduction to the coprocessors is available here . 1) Here is the code for the coprocessor which is triggered when the clients HTable.get() method is executed. The method preGet method is overridden to check if rowkey equals to @@@GETTIME@@@ in the HTable.get() and populates the result with an...