http://blog.zahoor.in/2012/08/hbase-hmaster-architecture/
HBase architecture follows the traditional master slave model where you have a master which takes decisions and one or more slaves which does the real task. In HBase, the master is called HMaster and slaves are called HRegionServers (yes..servers). In this post i will zoom in to HMaster and will detail some of the modules and functionality of HMaster.
Lets zoom in to HMaster and discuss different modules present in that.
Note: Most of the descriptions are taken from javadocs of HBase project. So all credits goes to the developers who wrote it in the first place.
The above diagram shows the internals of HMaster. I have grouped the modules in to different categories for us to make it a little easy.
1 ) External Interfaces
External Interfaces are responsible for interacting with the external world (Hmaster web site, client, Region Servers and other management utilities like JConsole).
Info Server
Info server is an embedded jetty server instance started by HMaster to answer http requests (default port is 60010). The primary goal is to serve up status information for the server. There are three contexts:
- “/stacks/” -> points to stack trace
- “/static/” -> points to common static files (src/hbase-webapps/static)
- “/” -> the jsp server code from (src/hbase-webapps/<name>)
RPC Server
HBase rpc server module instantiates the configured RPC Engine which is responsible for all the rpc communication that the master does. There are atleast two different RPC Engines in hbase now. One is the good old WritableRPCEngine (Which is the default) and the other one is the ProtocolBufferRPCEngine. Whichever is selected, they maintain 3 different interfaces/protocols to which they respond. In master, the supported protocols are MasterMonitorProtocol, MasterAdminProtocol and RegionServerStatusProtocol. More about protocols in my earlier post here.
Master MXBean
Apart from standard HBase metrics, hbase supports Java Management Extension based metric export. You can use any standard JMX compliant browser like JConsole and can view the metrics. To enable JMX based remote metrics monitoring in hbase follow the instructions here
2 ) Executor Services
A generic executor service abstracts a Event Queue wh