|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.master.RegionPlacementMaintainer
@InterfaceAudience.Private public class RegionPlacementMaintainer
A tool that is used for manipulating and viewing favored nodes information for regions. Run with -h to get a list of the options
Nested Class Summary | |
---|---|
protected static class |
RegionPlacementMaintainer.RandomizedMatrix
Some algorithms for solving the assignment problem may traverse workers or jobs in linear order which may result in skewing the assignments of the first jobs in the matrix toward the last workers in the matrix if the costs are uniform. |
Constructor Summary | |
---|---|
RegionPlacementMaintainer(org.apache.hadoop.conf.Configuration conf)
|
|
RegionPlacementMaintainer(org.apache.hadoop.conf.Configuration conf,
boolean enforceLocality,
boolean enforceMinAssignmentMove)
|
Method Summary | |
---|---|
void |
checkDifferencesWithOldPlan(Map<TableName,Integer> movesPerTable,
Map<String,Map<String,Float>> regionLocalityMap,
FavoredNodesPlan newPlan)
Compares two plans and check whether the locality dropped or increased (prints the information as a string) also prints the baseline locality |
static List<ServerName> |
getFavoredNodeList(String favoredNodesStr)
|
FavoredNodesPlan |
getNewAssignmentPlan()
|
SnapshotOfRegionAssignmentFromMeta |
getRegionAssignmentSnapshot()
|
Map<TableName,Integer> |
getRegionsMovement(FavoredNodesPlan newPlan)
Return how many regions will move per table since their primary RS will change |
static void |
main(String[] args)
|
static void |
printAssignmentPlan(FavoredNodesPlan plan)
Print the assignment plan to the system output stream |
void |
printDispersionScores(TableName table,
SnapshotOfRegionAssignmentFromMeta snapshot,
int numRegions,
FavoredNodesPlan newPlan,
boolean simplePrint)
|
void |
printLocalityAndDispersionForCurrentPlan(Map<String,Map<String,Float>> regionLocalityMap)
|
void |
setTargetTableName(String[] tableNames)
|
void |
updateAssignmentPlan(FavoredNodesPlan plan)
|
void |
updateAssignmentPlanToMeta(FavoredNodesPlan plan)
Update the assignment plan into hbase:meta |
List<AssignmentVerificationReport> |
verifyRegionPlacement(boolean isDetailMode)
Verify the region placement is consistent with the assignment plan |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegionPlacementMaintainer(org.apache.hadoop.conf.Configuration conf)
public RegionPlacementMaintainer(org.apache.hadoop.conf.Configuration conf, boolean enforceLocality, boolean enforceMinAssignmentMove)
Method Detail |
---|
public void setTargetTableName(String[] tableNames)
public SnapshotOfRegionAssignmentFromMeta getRegionAssignmentSnapshot() throws IOException
IOException
public List<AssignmentVerificationReport> verifyRegionPlacement(boolean isDetailMode) throws IOException
isDetailMode
-
IOException
public FavoredNodesPlan getNewAssignmentPlan() throws IOException
IOException
public static void printAssignmentPlan(FavoredNodesPlan plan)
plan
- public void updateAssignmentPlanToMeta(FavoredNodesPlan plan) throws IOException
plan
- the assignments plan to be updated into hbase:meta
IOException
- if cannot update assignment plan in hbase:metapublic void updateAssignmentPlan(FavoredNodesPlan plan) throws IOException
IOException
public Map<TableName,Integer> getRegionsMovement(FavoredNodesPlan newPlan) throws IOException
newPlan
- - new AssignmentPlan
IOException
public void checkDifferencesWithOldPlan(Map<TableName,Integer> movesPerTable, Map<String,Map<String,Float>> regionLocalityMap, FavoredNodesPlan newPlan) throws IOException
movesPerTable
- - how many primary regions will move per tableregionLocalityMap
- - locality map from FSnewPlan
- - new assignment plan
IOException
public void printDispersionScores(TableName table, SnapshotOfRegionAssignmentFromMeta snapshot, int numRegions, FavoredNodesPlan newPlan, boolean simplePrint)
public void printLocalityAndDispersionForCurrentPlan(Map<String,Map<String,Float>> regionLocalityMap) throws IOException
IOException
public static List<ServerName> getFavoredNodeList(String favoredNodesStr)
favoredNodesStr
- The String of favored nodes
public static void main(String[] args) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |