HBase-HMaster源码分析

来源:互联网 发布:天津二手房成交量数据 编辑:程序博客网 时间:2024/05/18 02:28

HMaster

相关类:
MasterProtos.MasterService.BlockingInterface:
hbaseadmin的操作,以及各种的元数据,状态管理

RegionServerStatusProtos.RegionServerStatusService.BlockingInterface:
master与regionserver交互,regionserver的心跳处理

RpcServer:handler数量
FifoRpcScheduler:http://blog.csdn.net/javaman_chen/article/details/47039517

this.rpcServer = new RpcServer(this, name, getServices(),      initialIsa, // BindAddress is IP we got for this server.      conf,      new FifoRpcScheduler(conf, numHandlers));    this.zooKeeper = new ZooKeeperWatcher(conf, MASTER + ":" + isa.getPort(), this, true);    this.rpcServer.startThreads();    // metrics interval: using the same property as region server. regionserver心跳间隔    this.msgInterval = conf.getInt("hbase.regionserver.msginterval", 3 * 1000);    // should we check the compression codec type at master side, default true, HBASE-6370    this.masterCheckCompression = conf.getBoolean("hbase.master.check.compression", true);    // should we check encryption settings at master side, default true    this.masterCheckEncryption = conf.getBoolean("hbase.master.check.encryption", true);    this.metricsMaster = new MetricsMaster( new MetricsMasterWrapperImpl(this));    this.pauseMonitor = new JvmPauseMonitor(conf, metricsMaster.getMetricsSource());

HealthCheckChore–>HealthChecker

启动过程

重要方法
run()方法:
初始化infoServer
activeMasterManager
clusterStatusTracker

finishInitialization方法

重要变量
masterAddressTracker 监听znode:conf.get(“zookeeper.znode.master”)

regionServerTracker
drainingServerTracker
loadBalancerTracker
catalogTracker
clusterStatusTracker

tableNamespaceManager
fileSystemManager
serverManager
assignmentManager
tableLockManager
snapshotManager

balancer

      this.clusterStatusChore = getAndStartClusterStatusChore(this);      this.balancerChore = getAndStartBalancerChore(this);      this.catalogJanitorChore = new CatalogJanitor(this, this);

cpHost
serverManager

HealthCheckChore:心跳检查

相关参数:
hbase.status.published 默认false ClusterStatusPublisher

原创粉丝点击