Database Reference
In-Depth Information
To provide lexibility, the coprocessor framework provides two different categories
of coprocessor extensions as:
• The observer coprocessor
• The endpoint coprocessor
The observer coprocessor
Observer coprocessors are like triggers in the database world. They allow the cluster
to behave differently during normal execution of client operations, for example, an
observer coprocessor layered between the client and HBase to inluence the data
access at run time. Another example, is running an observer coprocessor after every
Get command to modify the result returned to the client at run time or after a Put
command and manipulating data before it's persisted. Multiple observers can be
registered simultaneously and their priorities can be deined for execution. The
CoprocessorHost class manages observer registration and execution on behalf
of the region.
Based on the HBase architecture, observer coprocessors can further be categorized
into the following types:
RegionObserver : As the name suggests, RegionObserver runs on the region
and a multiple RegionObserver coprocessor can be registered to run on the
same RegionServer. RegionObserver provides a hook for data manipulation
operations such as Get , Put , Delete , Scan , and so on. These data-manipulation
commands can be executed along with both pre and post observers. It also
deines the pre and post hooks for internal operations such as lushing
MemStore and splitting the region. The coniguration property, hbase.
coprocessor.region.classes , can be set to register the region observer.
RegionServerObserver : This observer provides the pre and post hooks for
the merge, commits, and rollback operations and runs within the context of
the HBase region server. This coprocessor can be registered using the hbase.
coprocessor.regionserver.classes coniguration property.
WALObserver : This observer provides hooks for the write-ahead log (WAL)
and support for the pre and post WAL write events. The WALObserver
coprocessor always runs in the context of WAL processing on a region server
and can be registered by setting the hbase.coprocessor.wal.classes
coniguration property.
 
Search WWH ::




Custom Search