Search in sources :

Example 1 with ReplicationManager

use of org.apache.hadoop.hbase.master.replication.ReplicationManager in project hbase by apache.

the class HMaster method initializeZKBasedSystemTrackers.

/**
   * Initialize all ZK based system trackers.
   */
void initializeZKBasedSystemTrackers() throws IOException, InterruptedException, KeeperException, CoordinatedStateException {
    this.balancer = LoadBalancerFactory.getLoadBalancer(conf);
    this.normalizer = RegionNormalizerFactory.getRegionNormalizer(conf);
    this.normalizer.setMasterServices(this);
    this.normalizer.setMasterRpcServices((MasterRpcServices) rpcServices);
    this.loadBalancerTracker = new LoadBalancerTracker(zooKeeper, this);
    this.loadBalancerTracker.start();
    this.regionNormalizerTracker = new RegionNormalizerTracker(zooKeeper, this);
    this.regionNormalizerTracker.start();
    this.splitOrMergeTracker = new SplitOrMergeTracker(zooKeeper, conf, this);
    this.splitOrMergeTracker.start();
    this.assignmentManager = new AssignmentManager(this, serverManager, this.balancer, this.service, this.metricsMaster, tableStateManager);
    this.replicationManager = new ReplicationManager(conf, zooKeeper, this);
    this.regionServerTracker = new RegionServerTracker(zooKeeper, this, this.serverManager);
    this.regionServerTracker.start();
    this.drainingServerTracker = new DrainingServerTracker(zooKeeper, this, this.serverManager);
    this.drainingServerTracker.start();
    this.maintenanceModeTracker = new MasterMaintenanceModeTracker(zooKeeper);
    this.maintenanceModeTracker.start();
    // Set the cluster as up.  If new RSs, they'll be waiting on this before
    // going ahead with their startup.
    boolean wasUp = this.clusterStatusTracker.isClusterUp();
    if (!wasUp)
        this.clusterStatusTracker.setClusterUp();
    LOG.info("Server active/primary master=" + this.serverName + ", sessionid=0x" + Long.toHexString(this.zooKeeper.getRecoverableZooKeeper().getSessionId()) + ", setting cluster-up flag (Was=" + wasUp + ")");
    // create/initialize the snapshot manager and other procedure managers
    this.snapshotManager = new SnapshotManager();
    this.mpmHost = new MasterProcedureManagerHost();
    this.mpmHost.register(this.snapshotManager);
    this.mpmHost.register(new MasterFlushTableProcedureManager());
    this.mpmHost.loadProcedures(conf);
    this.mpmHost.initialize(this, this.metricsMaster);
}
Also used : MasterFlushTableProcedureManager(org.apache.hadoop.hbase.procedure.flush.MasterFlushTableProcedureManager) ReplicationManager(org.apache.hadoop.hbase.master.replication.ReplicationManager) MasterProcedureManagerHost(org.apache.hadoop.hbase.procedure.MasterProcedureManagerHost) LoadBalancerTracker(org.apache.hadoop.hbase.zookeeper.LoadBalancerTracker) DrainingServerTracker(org.apache.hadoop.hbase.zookeeper.DrainingServerTracker) RegionNormalizerTracker(org.apache.hadoop.hbase.zookeeper.RegionNormalizerTracker) SplitOrMergeTracker(org.apache.hadoop.hbase.zookeeper.SplitOrMergeTracker) MasterMaintenanceModeTracker(org.apache.hadoop.hbase.zookeeper.MasterMaintenanceModeTracker) RegionServerTracker(org.apache.hadoop.hbase.zookeeper.RegionServerTracker) SnapshotManager(org.apache.hadoop.hbase.master.snapshot.SnapshotManager)

Aggregations

ReplicationManager (org.apache.hadoop.hbase.master.replication.ReplicationManager)1 SnapshotManager (org.apache.hadoop.hbase.master.snapshot.SnapshotManager)1 MasterProcedureManagerHost (org.apache.hadoop.hbase.procedure.MasterProcedureManagerHost)1 MasterFlushTableProcedureManager (org.apache.hadoop.hbase.procedure.flush.MasterFlushTableProcedureManager)1 DrainingServerTracker (org.apache.hadoop.hbase.zookeeper.DrainingServerTracker)1 LoadBalancerTracker (org.apache.hadoop.hbase.zookeeper.LoadBalancerTracker)1 MasterMaintenanceModeTracker (org.apache.hadoop.hbase.zookeeper.MasterMaintenanceModeTracker)1 RegionNormalizerTracker (org.apache.hadoop.hbase.zookeeper.RegionNormalizerTracker)1 RegionServerTracker (org.apache.hadoop.hbase.zookeeper.RegionServerTracker)1 SplitOrMergeTracker (org.apache.hadoop.hbase.zookeeper.SplitOrMergeTracker)1