@InterfaceAudience.Private public class SnapshotOfRegionAssignmentFromMeta extends Object
Modifier and Type | Field and Description |
---|---|
private Connection |
connection |
private Set<TableName> |
disabledTables |
private boolean |
excludeOfflinedSplitParents |
private FavoredNodesPlan |
existingAssignmentPlan
the existing assignment plan in the hbase:meta region
|
private static org.apache.commons.logging.Log |
LOG |
private Map<String,HRegionInfo> |
regionNameToRegionInfoMap
the region name to region info map
|
private Map<ServerName,List<HRegionInfo>> |
regionServerToRegionMap
the regionServer to region map
|
private Map<HRegionInfo,ServerName> |
regionToRegionServerMap
the region to region server map
|
private Map<TableName,List<HRegionInfo>> |
tableToRegionMap
the table name to region map
|
Constructor and Description |
---|
SnapshotOfRegionAssignmentFromMeta(Connection connection) |
SnapshotOfRegionAssignmentFromMeta(Connection connection,
Set<TableName> disabledTables,
boolean excludeOfflinedSplitParents) |
Modifier and Type | Method and Description |
---|---|
private void |
addAssignment(HRegionInfo regionInfo,
ServerName server) |
private void |
addRegion(HRegionInfo regionInfo) |
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
|
private static final org.apache.commons.logging.Log LOG
private final Connection connection
private final Map<TableName,List<HRegionInfo>> tableToRegionMap
private Map<HRegionInfo,ServerName> regionToRegionServerMap
private final Map<String,HRegionInfo> regionNameToRegionInfoMap
private final Map<ServerName,List<HRegionInfo>> regionServerToRegionMap
private final FavoredNodesPlan existingAssignmentPlan
private final boolean excludeOfflinedSplitParents
public SnapshotOfRegionAssignmentFromMeta(Connection connection)
public SnapshotOfRegionAssignmentFromMeta(Connection connection, Set<TableName> disabledTables, boolean excludeOfflinedSplitParents)
public void initialize() throws IOException
IOException
private void addRegion(HRegionInfo regionInfo)
private void addAssignment(HRegionInfo regionInfo, ServerName server)
public Map<String,HRegionInfo> getRegionNameToRegionInfoMap()
public Map<TableName,List<HRegionInfo>> getTableToRegionMap()
public Map<HRegionInfo,ServerName> getRegionToRegionServerMap()
public Map<ServerName,List<HRegionInfo>> getRegionServerToRegionMap()
public FavoredNodesPlan getExistingAssignmentPlan()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.