本文整理汇总了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());
}
}
示例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());
}
}
示例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;
}
示例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;
}
示例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;
}