HBase coprocessor Loading process (1.2.x)

Source: Internet
Author: User
First, to see Observercoprocessor:
1. The static load configuration of the observer coprocessor is configured in Hbase-site.xml with the following properties:
Configure Regionobservers and endpoints with hbase.coprocessor.region.classes.
Configure Walobservers with hbase.coprocessor.wal.classes.
Configure Masterobservers with hbase.coprocessor.master.classes.


Hbase.coprocessor.region.classes: Will be loaded on all the default tables.
Hbase.coprocessor.master.classes: Loaded by the hmaster process.


The corresponding Java classes are: Hmaster, hregion, Fshlog
2.HMaster
There is a property called Mastercoprocessorhost Cphost in Hmaster;
And a description of the Mastercoprocessorhost class:
Provides a coprocessor framework and environment for host-oriented operations. @link Hmaster interacts with the loaded coprocessor through this class.
Basemasterobserver implementation of MASTEROBSERVER, our custom observer coprocessor implements Basemasterobserver. In this class, there are all the methods in the Masterobserver, and finally the corresponding method is called.
Like what:


When a table is created, it is called in the Createtablehandler class:


3.HRegion
There is also a property called Private Regioncoprocessorhost coprocessorhost;
Description information for the Regioncoprocessorhost class:
Implements the coprocessor environment and runtime support that is loaded within the @link zone.
Called in the law of the Parties:



Call the hook function in Hregion:





3. Fshlog
The attributes in Fshlog are: walcoprocessorhost, which acts like the top two.
invocation Example
The Append method in the Fshlog class calls the coprocessor's hook function:





Second, endpoint co-processor
Dynamic RPC endpoints are similar to stored procedures. The terminal can be called from the client at any time. When invoked, it is executed remotely in the target region or zone, and the execution results are returned to the client.
Endpoint coprocessor-The dynamic RPC protocol, which computes directly in region, writes the client code call service and returns the result to the client (reponse).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.