hbase代码学习-HMaster

HMaster 是HBase的主服务器,对于一个HBase集群来说只有一个活动的主服务器,当然可以起动多个主服务器作为备份,这样当主活动的主服务器被关闭或者出现异常时,可以快速的切换到备份主服务器,使之成为活动的主服务器。

HMaster 主要实现了三个接口HMasterInterface, HMasterRegionInterface, MasterServices,

1)HMasterInterface

主要负责管理HMaster的起动、停止,获取集群的状态、分配region,balance等,以及对表的管理,包括:

创建表、删除表,添加列簇、删除列簇、修改列簇,对表的enable,disable,修改表描述信息,获取表描述信息等

2)HMasterRegionInterface

主要用于regionserver的起动,以及报告regionserver的状态信息

3)MasterServices为master提供的服务作支持

可以参照:

http://qing.weibo.com/tj/53dcb3de330005gd.html

猜你喜欢

转载自piaoling.iteye.com/blog/1457043
今日推荐