org.apache.hadoop.hbase.master
Class SnapshotOfRegionAssignmentFromMeta

java.lang.Object
  extended by org.apache.hadoop.hbase.master.SnapshotOfRegionAssignmentFromMeta

@InterfaceAudience.Private
public class SnapshotOfRegionAssignmentFromMeta
extends Object

Used internally for reading meta and constructing datastructures that are then queried, for things like regions to regionservers, table to regions, etc. It also records the favored nodes mapping for regions.


Constructor Summary
SnapshotOfRegionAssignmentFromMeta(CatalogTracker tracker)
           
SnapshotOfRegionAssignmentFromMeta(CatalogTracker tracker, Set<TableName> disabledTables, boolean excludeOfflinedSplitParents)
           
 
Method Summary
 FavoredNodesPlan getExistingAssignmentPlan()
          Get the favored nodes plan
 Map<String,HRegionInfo> getRegionNameToRegionInfoMap()
          Get the regioninfo for a region
 Map<ServerName,List<HRegionInfo>> getRegionServerToRegionMap()
          Get regionserver to region map
 Map<HRegionInfo,ServerName> getRegionToRegionServerMap()
          Get region to region server map
 Set<TableName> getTableSet()
          Get the table set
 Map<TableName,List<HRegionInfo>> getTableToRegionMap()
          Get regions for tables
 void initialize()
          Initialize the region assignment snapshot by scanning the hbase:meta table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnapshotOfRegionAssignmentFromMeta

public SnapshotOfRegionAssignmentFromMeta(CatalogTracker tracker)

SnapshotOfRegionAssignmentFromMeta

public SnapshotOfRegionAssignmentFromMeta(CatalogTracker tracker,
                                          Set<TableName> disabledTables,
                                          boolean excludeOfflinedSplitParents)
Method Detail

initialize

public void initialize()
                throws IOException
Initialize the region assignment snapshot by scanning the hbase:meta table

Throws:
IOException

getRegionNameToRegionInfoMap

public Map<String,HRegionInfo> getRegionNameToRegionInfoMap()
Get the regioninfo for a region

Returns:
the regioninfo

getTableToRegionMap

public Map<TableName,List<HRegionInfo>> getTableToRegionMap()
Get regions for tables

Returns:
a mapping from table to regions

getRegionToRegionServerMap

public Map<HRegionInfo,ServerName> getRegionToRegionServerMap()
Get region to region server map

Returns:
region to region server map

getRegionServerToRegionMap

public Map<ServerName,List<HRegionInfo>> getRegionServerToRegionMap()
Get regionserver to region map

Returns:
regionserver to region map

getExistingAssignmentPlan

public FavoredNodesPlan getExistingAssignmentPlan()
Get the favored nodes plan

Returns:
the existing favored nodes plan

getTableSet

public Set<TableName> getTableSet()
Get the table set

Returns:
the table set


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.