Overview of Apache HBase Coprocessors
masterHBase Coprocessors allow you to run custom code directly on the RegionServers where your data resides. This moves computation to the data, reducing network bottlenecks that occur when moving large amounts of data to a client for processing.
Implementation Workflow
- Implement an Interface: Your class must implement one of the following interfaces:
CoprocessorRegionObserverCoprocessorService
- Load the Coprocessor: Load it either statically via configuration or dynamically using the HBase Shell.
- Invoke the Coprocessor: Call the coprocessor from your client-side code. HBase handles the execution transparently for Observers, while Endpoints require explicit invocation.
WARNING Coprocessors are advanced features. Because they run directly on the RegionServer with direct data access, they can cause data corruption or malicious access. There is currently no resource isolation, so a misbehaving coprocessor can degrade cluster performance and stability.