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


Java RegionPlan.getRegionInfo方法代码示例

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


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

示例1: saveRegionPlanList

import org.apache.hadoop.hbase.master.RegionPlan; //导入方法依赖的package包/类
private void saveRegionPlanList(List<RegionPlan> regionPlanList) {
  for (RegionPlan regionPlan : regionPlanList) {
    HRegionInfo hri = regionPlan.getRegionInfo();
    if (!this.indexedAndIndexTables.contains(hri.getTable())) continue;
    if (LOG.isDebugEnabled()) {
      LOG.debug("Saving region plan of region " + hri.getRegionNameAsString() + '.');
    }
    regionOnline(hri, regionPlan.getDestination());
  }
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:11,代码来源:SecIndexLoadBalancer.java

示例2: saveRegionPlanList

import org.apache.hadoop.hbase.master.RegionPlan; //导入方法依赖的package包/类
private void saveRegionPlanList(List<RegionPlan> regionPlanList) {
  for (RegionPlan regionPlan : regionPlanList) {
    HRegionInfo hri = regionPlan.getRegionInfo();
    if (LOG.isDebugEnabled()) {
      LOG.debug("Saving region plan of region " + hri.getRegionNameAsString() + '.');
    }
    putRegionPlan(hri, regionPlan.getDestination());
  }
}
 
开发者ID:Huawei-Hadoop,项目名称:hindex,代码行数:10,代码来源:SecIndexLoadBalancer.java

示例3: prepareIndexPlan

import org.apache.hadoop.hbase.master.RegionPlan; //导入方法依赖的package包/类
private List<RegionPlan> prepareIndexPlan(Map<ServerName, List<HRegionInfo>> indexClusterState,
    List<RegionPlan> regionPlanList, List<RegionPlan> regionPlanListCopy) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("Entered prepareIndexPlan");
  }
  OUTER_LOOP: for (RegionPlan regionPlan : regionPlanListCopy) {
    HRegionInfo hri = regionPlan.getRegionInfo();

    MIDDLE_LOOP: for (Entry<ServerName, List<HRegionInfo>> serverVsRegionList : indexClusterState
        .entrySet()) {
      List<HRegionInfo> indexRegions = serverVsRegionList.getValue();
      ServerName server = serverVsRegionList.getKey();
      if (regionPlan.getDestination().equals(server)) {
        // desination server in the region plan is new and should not be same with this
        // server in index cluster state.thats why skipping regions check in this server
        continue MIDDLE_LOOP;
      }
      String actualTableName = null;

      for (HRegionInfo indexRegionInfo : indexRegions) {
        String indexTableName = indexRegionInfo.getTable().getNameAsString();
        actualTableName = extractActualTableName(indexTableName);
        if (false == hri.getTable().getNameAsString().equals(actualTableName)) {
          continue;
        }
        if (0 != Bytes.compareTo(hri.getStartKey(), indexRegionInfo.getStartKey())) {
          continue;
        }
        RegionPlan rp = new RegionPlan(indexRegionInfo, server, regionPlan.getDestination());
        if (LOG.isDebugEnabled()) {
          LOG.debug("Selected server " + regionPlan.getDestination()
              + " as destination for region " + indexRegionInfo.getRegionNameAsString()
              + "from user region plan.");
        }

        regionOnline(indexRegionInfo, regionPlan.getDestination());
        regionPlanList.add(rp);
        continue OUTER_LOOP;
      }
    }
  }
  regionPlanListCopy.clear();
  // if no user regions to balance then return newly formed index region plan.
  if (LOG.isDebugEnabled()) {
    LOG.debug("Exited prepareIndexPlan");
  }
  return regionPlanList;
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:49,代码来源:SecIndexLoadBalancer.java

示例4: MoveRegionProcedure

import org.apache.hadoop.hbase.master.RegionPlan; //导入方法依赖的package包/类
public MoveRegionProcedure(final MasterProcedureEnv env, final RegionPlan plan) {
  super(env, plan.getRegionInfo());
  this.plan = plan;
}
 
开发者ID:apache,项目名称:hbase,代码行数:5,代码来源:MoveRegionProcedure.java

示例5: prepareIndexPlan

import org.apache.hadoop.hbase.master.RegionPlan; //导入方法依赖的package包/类
private List<RegionPlan> prepareIndexPlan(Map<ServerName, List<HRegionInfo>> indexClusterState,
    List<RegionPlan> regionPlanList, List<RegionPlan> regionPlanListCopy) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("Entered prepareIndexPlan");
  }
  OUTER_LOOP: for (RegionPlan regionPlan : regionPlanListCopy) {
    HRegionInfo hri = regionPlan.getRegionInfo();

    MIDDLE_LOOP: for (Entry<ServerName, List<HRegionInfo>> serverVsRegionList : indexClusterState
        .entrySet()) {
      List<HRegionInfo> indexRegions = serverVsRegionList.getValue();
      ServerName server = serverVsRegionList.getKey();
      if (regionPlan.getDestination().equals(server)) {
        // desination server in the region plan is new and should not be same with this
        // server in index cluster state.thats why skipping regions check in this server
        continue MIDDLE_LOOP;
      }
      String actualTableName = null;

      for (HRegionInfo indexRegionInfo : indexRegions) {
        String indexTableName = indexRegionInfo.getTableNameAsString();
        actualTableName = extractActualTableName(indexTableName);
        if (false == hri.getTableNameAsString().equals(actualTableName)) {
          continue;
        }
        if (0 != Bytes.compareTo(hri.getStartKey(), indexRegionInfo.getStartKey())) {
          continue;
        }
        RegionPlan rp = new RegionPlan(indexRegionInfo, server, regionPlan.getDestination());
        if (LOG.isDebugEnabled()) {
          LOG.debug("Selected server " + regionPlan.getDestination()
              + " as destination for region " + indexRegionInfo.getRegionNameAsString()
              + "from user region plan.");
        }

        putRegionPlan(indexRegionInfo, regionPlan.getDestination());
        regionPlanList.add(rp);
        continue OUTER_LOOP;
      }
    }
  }
  regionPlanListCopy.clear();
  // if no user regions to balance then return newly formed index region plan.
  if (LOG.isDebugEnabled()) {
    LOG.debug("Exited prepareIndexPlan");
  }
  return regionPlanList;
}
 
开发者ID:Huawei-Hadoop,项目名称:hindex,代码行数:49,代码来源:SecIndexLoadBalancer.java


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