当前位置: 首页>>代码示例>>Java>>正文


Java HMaster.getServerName方法代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.master.HMaster.getServerName方法的典型用法代码示例。如果您正苦于以下问题:Java HMaster.getServerName方法的具体用法?Java HMaster.getServerName怎么用?Java HMaster.getServerName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.hbase.master.HMaster的用法示例。


在下文中一共展示了HMaster.getServerName方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getServerHoldingRegion

import org.apache.hadoop.hbase.master.HMaster; //导入方法依赖的package包/类
@Override
public ServerName getServerHoldingRegion(final TableName tn, byte[] regionName)
throws IOException {
  // Assume there is only one master thread which is the active master.
  // If there are multiple master threads, the backup master threads
  // should hold some regions. Please refer to #countServedRegions
  // to see how we find out all regions.
  HMaster master = getMaster();
  Region region = master.getOnlineRegion(regionName);
  if (region != null) {
    return master.getServerName();
  }
  int index = getServerWith(regionName);
  if (index < 0) {
    return null;
  }
  return getRegionServer(index).getServerName();
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:19,代码来源:MiniHBaseCluster.java

示例2: getServerHoldingRegion

import org.apache.hadoop.hbase.master.HMaster; //导入方法依赖的package包/类
@Override
public ServerName getServerHoldingRegion(final TableName tn, byte[] regionName)
throws IOException {
  // Assume there is only one master thread which is the active master.
  // If there are multiple master threads, the backup master threads
  // should hold some regions. Please refer to #countServedRegions
  // to see how we find out all regions.
  HMaster master = getMaster();
  HRegion region = master.getOnlineRegion(regionName);
  if (region != null) {
    return master.getServerName();
  }
  int index = getServerWith(regionName);
  if (index < 0) {
    return null;
  }
  return getRegionServer(index).getServerName();
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:19,代码来源:MiniHBaseCluster.java

示例3: stopMasterAndAssignMeta

import org.apache.hadoop.hbase.master.HMaster; //导入方法依赖的package包/类
public static void stopMasterAndAssignMeta(HBaseTestingUtility HTU)
    throws NodeExistsException, KeeperException, IOException, InterruptedException {
  // Stop master
  HMaster master = HTU.getHBaseCluster().getMaster();
  Thread masterThread = HTU.getHBaseCluster().getMasterThread();
  ServerName masterAddr = master.getServerName();
  master.stopMaster();

  LOG.info("Waiting until master thread exits");
  while (masterThread != null && masterThread.isAlive()) {
    Threads.sleep(100);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:14,代码来源:TestRegionServerNoMaster.java

示例4: ClusterStatusChore

import org.apache.hadoop.hbase.master.HMaster; //导入方法依赖的package包/类
public ClusterStatusChore(HMaster master, LoadBalancer balancer) {
  super(master.getServerName() + "-ClusterStatusChore",
        master.getConfiguration().getInt("hbase.balancer.statusPeriod", 60000),
        master);
  this.master = master;
  this.balancer = balancer;
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:8,代码来源:ClusterStatusChore.java

示例5: ClusterStatusChore

import org.apache.hadoop.hbase.master.HMaster; //导入方法依赖的package包/类
public ClusterStatusChore(HMaster master, LoadBalancer balancer) {
  super(master.getServerName() + "-ClusterStatusChore", master, master.getConfiguration().getInt(
    "hbase.balancer.statusPeriod", 60000));
  this.master = master;
  this.balancer = balancer;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:7,代码来源:ClusterStatusChore.java

示例6: BalancerChore

import org.apache.hadoop.hbase.master.HMaster; //导入方法依赖的package包/类
public BalancerChore(HMaster master) {
  super(master.getServerName() + "-BalancerChore", master, master.getConfiguration().getInt(
    "hbase.balancer.period", 300000));
  this.master = master;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:6,代码来源:BalancerChore.java

示例7: RegionNormalizerChore

import org.apache.hadoop.hbase.master.HMaster; //导入方法依赖的package包/类
public RegionNormalizerChore(HMaster master) {
  super(master.getServerName() + "-RegionNormalizerChore", master,
    master.getConfiguration().getInt("hbase.normalizer.period", 300000));
  this.master = master;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:6,代码来源:RegionNormalizerChore.java

示例8: MasterThread

import org.apache.hadoop.hbase.master.HMaster; //导入方法依赖的package包/类
public MasterThread(final HMaster m, final int index) {
  super(m, "Master:" + index + ";" + m.getServerName());
  this.master = m;
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:5,代码来源:JVMClusterUtil.java

示例9: BalancerChore

import org.apache.hadoop.hbase.master.HMaster; //导入方法依赖的package包/类
public BalancerChore(HMaster master) {
  super(master.getServerName() + "-BalancerChore",
      master.getConfiguration().getInt("hbase.balancer.period", 300000),
      master);
  this.master = master;
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:7,代码来源:BalancerChore.java


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