• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java LoadBalancerTracker类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.hadoop.hbase.zookeeper.LoadBalancerTracker的典型用法代码示例。如果您正苦于以下问题:Java LoadBalancerTracker类的具体用法?Java LoadBalancerTracker怎么用?Java LoadBalancerTracker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LoadBalancerTracker类属于org.apache.hadoop.hbase.zookeeper包,在下文中一共展示了LoadBalancerTracker类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setup

import org.apache.hadoop.hbase.zookeeper.LoadBalancerTracker; //导入依赖的package包/类
@Before
public void setup() throws Exception {
  TEST_UTIL.getConfiguration().setInt("zookeeper.session.timeout", 30000);
  TEST_UTIL.getConfiguration().setInt(HConstants.META_REPLICAS_NUM, 3);
  TEST_UTIL.getConfiguration().setInt(
      StorefileRefresherChore.REGIONSERVER_STOREFILE_REFRESH_PERIOD, 1000);
  TEST_UTIL.startMiniCluster(3);
  // disable the balancer
  LoadBalancerTracker l = new LoadBalancerTracker(TEST_UTIL.getZooKeeperWatcher(),
      new Abortable() {
    boolean aborted = false;
    @Override
    public boolean isAborted() {
      return aborted;
    }
    @Override
    public void abort(String why, Throwable e) {
      aborted = true;
    }
  });
  l.setBalancerOn(false);
  for (int replicaId = 1; replicaId < 3; replicaId ++) {
    HRegionInfo h = RegionReplicaUtil.getRegionInfoForReplica(HRegionInfo.FIRST_META_REGIONINFO,
      replicaId);
    TEST_UTIL.getMiniHBaseCluster().getMaster().getAssignmentManager().waitForAssignment(h);
  }
  LOG.debug("All meta replicas assigned");
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:29,代码来源:TestMetaWithReplicas.java


示例2: initializeZKBasedSystemTrackers

import org.apache.hadoop.hbase.zookeeper.LoadBalancerTracker; //导入依赖的package包/类
/**
 * Initialize all ZK based system trackers.
 *
 * @throws IOException
 * @throws InterruptedException
 * @throws KeeperException
 * @throws CoordinatedStateException
 */
void initializeZKBasedSystemTrackers() throws IOException,
        InterruptedException, KeeperException, CoordinatedStateException {
    this.balancer = LoadBalancerFactory.getLoadBalancer(conf);
    this.loadBalancerTracker = new LoadBalancerTracker(zooKeeper, this);
    this.loadBalancerTracker.start();
    this.assignmentManager = new AssignmentManager(this, serverManager,
            this.balancer, this.service, this.metricsMaster,
            this.tableLockManager);
    zooKeeper.registerListenerFirst(assignmentManager);

    this.regionServerTracker = new RegionServerTracker(zooKeeper, this,
            this.serverManager);
    this.regionServerTracker.start();

    this.drainingServerTracker = new DrainingServerTracker(zooKeeper, this,
            this.serverManager);
    this.drainingServerTracker.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);
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:45,代码来源:HMaster.java


示例3: initializeZKBasedSystemTrackers

import org.apache.hadoop.hbase.zookeeper.LoadBalancerTracker; //导入依赖的package包/类
/**
 * Initialize all ZK based system trackers.
 * @throws IOException
 * @throws InterruptedException
 */
void initializeZKBasedSystemTrackers() throws IOException,
    InterruptedException, KeeperException {
  this.catalogTracker = createCatalogTracker(this.zooKeeper, this.conf, this);
  this.catalogTracker.start();

  this.balancer = LoadBalancerFactory.getLoadBalancer(conf);
  this.loadBalancerTracker = new LoadBalancerTracker(zooKeeper, this);
  this.loadBalancerTracker.start();
  this.assignmentManager = new AssignmentManager(this, serverManager,
    this.catalogTracker, this.balancer, this.executorService, this.metricsMaster,
    this.tableLockManager);
  zooKeeper.registerListenerFirst(assignmentManager);

  this.regionServerTracker = new RegionServerTracker(zooKeeper, this,
      this.serverManager);
  this.regionServerTracker.start();

  this.drainingServerTracker = new DrainingServerTracker(zooKeeper, this,
    this.serverManager);
  this.drainingServerTracker.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.loadProcedures(conf);
  this.mpmHost.initialize(this, this.metricsMaster);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:44,代码来源:HMaster.java


示例4: initializeZKBasedSystemTrackers

import org.apache.hadoop.hbase.zookeeper.LoadBalancerTracker; //导入依赖的package包/类
/**
 * Initialize all ZK based system trackers.
 * @throws IOException
 * @throws InterruptedException
 * @throws KeeperException
 * @throws CoordinatedStateException
 */
void initializeZKBasedSystemTrackers() throws IOException,
    InterruptedException, KeeperException, CoordinatedStateException {
  this.balancer = LoadBalancerFactory.getLoadBalancer(conf);
  this.loadBalancerTracker = new LoadBalancerTracker(zooKeeper, this);
  this.loadBalancerTracker.start();
  this.assignmentManager = new AssignmentManager(this, serverManager,
    this.catalogTracker, this.balancer, this.service, this.metricsMaster,
    this.tableLockManager);
  zooKeeper.registerListenerFirst(assignmentManager);

  this.regionServerTracker = new RegionServerTracker(zooKeeper, this,
      this.serverManager);
  this.regionServerTracker.start();

  this.drainingServerTracker = new DrainingServerTracker(zooKeeper, this,
    this.serverManager);
  this.drainingServerTracker.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);
}
 
开发者ID:shenli-uiuc,项目名称:PyroDB,代码行数:44,代码来源:HMaster.java


示例5: initializeZKBasedSystemTrackers

import org.apache.hadoop.hbase.zookeeper.LoadBalancerTracker; //导入依赖的package包/类
/**
 * Initialize all ZK based system trackers.
 * @throws IOException
 * @throws InterruptedException
 */
void initializeZKBasedSystemTrackers() throws IOException,
    InterruptedException, KeeperException {
  this.catalogTracker = createCatalogTracker(this.zooKeeper, this.conf, this);
  this.catalogTracker.start();

  this.balancer = LoadBalancerFactory.getLoadBalancer(conf);
  this.loadBalancerTracker = new LoadBalancerTracker(zooKeeper, this);
  this.loadBalancerTracker.start();
  this.assignmentManager = new AssignmentManager(this, serverManager,
    this.catalogTracker, this.balancer, this.executorService, this.metricsMaster,
    this.tableLockManager);
  zooKeeper.registerListenerFirst(assignmentManager);

  this.regionServerTracker = new RegionServerTracker(zooKeeper, this,
      this.serverManager);
  this.regionServerTracker.start();

  this.drainingServerTracker = new DrainingServerTracker(zooKeeper, this,
    this.serverManager);
  this.drainingServerTracker.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 the snapshot manager
  this.snapshotManager = new SnapshotManager(this, this.metricsMaster);
}
 
开发者ID:cloud-software-foundation,项目名称:c5,代码行数:40,代码来源:HMaster.java


示例6: initializeZKBasedSystemTrackers

import org.apache.hadoop.hbase.zookeeper.LoadBalancerTracker; //导入依赖的package包/类
/**
 * Initialize all ZK based system trackers.
 * @throws IOException
 * @throws InterruptedException
 */
private void initializeZKBasedSystemTrackers() throws IOException,
    InterruptedException, KeeperException {
  this.catalogTracker = createCatalogTracker(this.zooKeeper, this.conf,
      this, conf.getInt("hbase.master.catalog.timeout", 600000));
  this.catalogTracker.start();

  this.balancer = LoadBalancerFactory.getLoadBalancer(conf);
  this.loadBalancerTracker = new LoadBalancerTracker(zooKeeper, this);
  this.loadBalancerTracker.start();
  this.assignmentManager = new AssignmentManager(this, serverManager,
    this.catalogTracker, this.balancer, this.executorService, this.metricsMaster);
  zooKeeper.registerListenerFirst(assignmentManager);

  this.regionServerTracker = new RegionServerTracker(zooKeeper, this,
      this.serverManager);
  this.regionServerTracker.start();

  this.drainingServerTracker = new DrainingServerTracker(zooKeeper, this,
    this.serverManager);
  this.drainingServerTracker.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()) +
      ", cluster-up flag was=" + wasUp);
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:37,代码来源:HMaster.java


示例7: initializeZKBasedSystemTrackers

import org.apache.hadoop.hbase.zookeeper.LoadBalancerTracker; //导入依赖的package包/类
/**
 * Initialize all ZK based system trackers.
 * @throws IOException
 * @throws InterruptedException
 * @throws KeeperException
 * @throws CoordinatedStateException
 */
void initializeZKBasedSystemTrackers() throws IOException,
    InterruptedException, KeeperException, CoordinatedStateException {
  this.balancer = LoadBalancerFactory.getLoadBalancer(conf);
  this.normalizer = RegionNormalizerFactory.getRegionNormalizer(conf);
  this.normalizer.setMasterServices(this);
  this.loadBalancerTracker = new LoadBalancerTracker(zooKeeper, this);
  this.loadBalancerTracker.start();
  this.regionNormalizerTracker = new RegionNormalizerTracker(zooKeeper, this);
  this.regionNormalizerTracker.start();
  this.assignmentManager = new AssignmentManager(this, serverManager,
    this.balancer, this.service, this.metricsMaster,
    this.tableLockManager);
  zooKeeper.registerListenerFirst(assignmentManager);

  this.regionServerTracker = new RegionServerTracker(zooKeeper, this,
      this.serverManager);
  this.regionServerTracker.start();

  this.drainingServerTracker = new DrainingServerTracker(zooKeeper, this,
    this.serverManager);
  this.drainingServerTracker.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);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:48,代码来源:HMaster.java


示例8: initializeZKBasedSystemTrackers

import org.apache.hadoop.hbase.zookeeper.LoadBalancerTracker; //导入依赖的package包/类
/**
 * Initialize all ZK based system trackers.
 */
void initializeZKBasedSystemTrackers() throws IOException, InterruptedException, KeeperException,
    CoordinatedStateException, ReplicationException {
  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();

  // Create Assignment Manager
  this.assignmentManager = new AssignmentManager(this);
  this.assignmentManager.start();

  this.replicationPeerManager = ReplicationPeerManager.create(zooKeeper, conf);

  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("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);
}
 
开发者ID:apache,项目名称:hbase,代码行数:52,代码来源:HMaster.java



注:本文中的org.apache.hadoop.hbase.zookeeper.LoadBalancerTracker类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Identifiable类代码示例发布时间:2022-05-23
下一篇:
Java MapIterator类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap