Class TestCacheAwareLoadBalancerCostFunctions.MockClusterForCacheCost
java.lang.Object
org.apache.hadoop.hbase.master.balancer.TestCacheAwareLoadBalancerCostFunctions.MockClusterForCacheCost
- Enclosing class:
- TestCacheAwareLoadBalancerCostFunctions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classorg.apache.hadoop.hbase.master.balancer.BalancerClusterState.DefaultRackManager(package private) static enumorg.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType -
Field Summary
FieldsModifier and TypeFieldDescription(package private) Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> (package private) org.agrona.collections.Int2IntCounterMap[](package private) org.agrona.collections.Int2IntCounterMap[](package private) org.agrona.collections.Int2IntCounterMap[](package private) boolean(package private) String[](package private) int[](package private) float[](package private) boolean(package private) int(package private) int[](package private) int(package private) int(package private) int(package private) int[][](package private) int[](package private) int(package private) int(package private) String[](package private) Map<String,org.apache.hadoop.hbase.util.Pair<org.apache.hadoop.hbase.ServerName, Float>> (package private) int[](package private) int[](package private) int[](package private) Deque<org.apache.hadoop.hbase.master.balancer.BalancerRegionLoad>[](package private) int[][](package private) org.apache.hadoop.hbase.client.RegionInfo[](package private) int[][](package private) int[][](package private) int[][](package private) int[](package private) int[](package private) int[](package private) Integer[](package private) Integer[](package private) org.apache.hadoop.hbase.ServerName[](package private) int[][](package private) int[][] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) int[]addRegion(int[] arg0, int arg1) (package private) int[]addRegionSorted(int[] arg0, int arg1) (package private) booleancontains(int[] arg0, int arg1) voiddoAction(org.apache.hadoop.hbase.master.balancer.BalanceAction arg0) (package private) voiddoAssignRegion(org.apache.hadoop.hbase.client.RegionInfo arg0, org.apache.hadoop.hbase.ServerName arg1) (package private) floatgetLocalityOfRegion(int arg0, int arg1) (package private) intgetLowestLocalityRegionOnServer(int arg0) (package private) intgetNumRegions(int arg0) floatgetOrComputeLocality(int arg0, int arg1, org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg2) float[][]protected floatgetOrComputeRegionCacheRatio(int arg0, int arg1) int[]getOrComputeRegionsToMostLocalEntities(org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg0) int[]doublegetOrComputeWeightedLocality(int arg0, int arg1, org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg2) floatgetOrComputeWeightedRegionCacheRatio(int arg0, int arg1) intgetRackForRegion(int arg0) protected floatgetRegionCacheRatioOnRegionServer(int region, int regionServerIndex) intgetRegionSizeMB(int arg0) intgetTotalRegionHFileSizeMB(int region) (package private) voidregionMoved(int arg0, int arg1, int arg2) (package private) int[]removeRegion(int[] arg0, int arg1) (package private) int[]replaceRegion(int[] arg0, int arg1, int arg2) booleanserverHasTooFewRegions(int arg0) (package private) voidsetNumMovedRegions(int arg0) (package private) voidsetNumRegions(int arg0) (package private) voidtoString()(package private) booleanwouldLowerAvailability(org.apache.hadoop.hbase.client.RegionInfo arg0, org.apache.hadoop.hbase.ServerName arg1)
-
Field Details
-
regionServerCacheRatio
-
servers
org.apache.hadoop.hbase.ServerName[] servers -
hosts
String[] hosts -
racks
String[] racks -
multiServersPerHost
boolean multiServersPerHost -
tables
-
regions
org.apache.hadoop.hbase.client.RegionInfo[] regions -
regionLoads
Deque<org.apache.hadoop.hbase.master.balancer.BalancerRegionLoad>[] regionLoads -
regionLocations
int[][] regionLocations -
serverIndexToHostIndex
int[] serverIndexToHostIndex -
serverIndexToRackIndex
int[] serverIndexToRackIndex -
regionsPerServer
int[][] regionsPerServer -
serverIndexToRegionsOffset
int[] serverIndexToRegionsOffset -
regionsPerHost
int[][] regionsPerHost -
regionsPerRack
int[][] regionsPerRack -
colocatedReplicaCountsPerServer
org.agrona.collections.Int2IntCounterMap[] colocatedReplicaCountsPerServer -
colocatedReplicaCountsPerHost
org.agrona.collections.Int2IntCounterMap[] colocatedReplicaCountsPerHost -
colocatedReplicaCountsPerRack
org.agrona.collections.Int2IntCounterMap[] colocatedReplicaCountsPerRack -
serversPerHost
int[][] serversPerHost -
serversPerRack
int[][] serversPerRack -
regionIndexToServerIndex
int[] regionIndexToServerIndex -
initialRegionIndexToServerIndex
int[] initialRegionIndexToServerIndex -
regionIndexToTableIndex
int[] regionIndexToTableIndex -
numRegionsPerServerPerTable
int[][] numRegionsPerServerPerTable -
numRegionsPerTable
int[] numRegionsPerTable -
numMaxRegionsPerTable
int[] numMaxRegionsPerTable -
regionIndexToPrimaryIndex
int[] regionIndexToPrimaryIndex -
hasRegionReplicas
boolean hasRegionReplicas -
serverIndicesSortedByRegionCount
Integer[] serverIndicesSortedByRegionCount -
serverIndicesSortedByLocality
Integer[] serverIndicesSortedByLocality -
serversToIndex
-
hostsToIndex
-
racksToIndex
-
tablesToIndex
-
regionsToIndex
-
localityPerServer
float[] localityPerServer -
numServers
int numServers -
numHosts
int numHosts -
numRacks
int numRacks -
numTables
int numTables -
numRegions
int numRegions -
numMovedRegions
int numMovedRegions -
clusterState
-
regionCacheRatioOnOldServerMap
-
-
Constructor Details
-
MockClusterForCacheCost
-
-
Method Details
-
getTotalRegionHFileSizeMB
-
getRegionCacheRatioOnRegionServer
-
serverHasTooFewRegions
public boolean serverHasTooFewRegions(int arg0) -
getOrComputeRackLocalities
public float[][] getOrComputeRackLocalities() -
getOrComputeRegionsToMostLocalEntities
public int[] getOrComputeRegionsToMostLocalEntities(org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg0) -
getOrComputeLocality
public float getOrComputeLocality(int arg0, int arg1, org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg2) -
getOrComputeWeightedLocality
public double getOrComputeWeightedLocality(int arg0, int arg1, org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg2) -
getRegionSizeMB
public int getRegionSizeMB(int arg0) -
getOrComputeWeightedRegionCacheRatio
public float getOrComputeWeightedRegionCacheRatio(int arg0, int arg1) -
getOrComputeRegionCacheRatio
protected float getOrComputeRegionCacheRatio(int arg0, int arg1) -
getOrComputeServerWithBestRegionCachedRatio
public int[] getOrComputeServerWithBestRegionCachedRatio() -
getRackForRegion
public int getRackForRegion(int arg0) -
doAction
public void doAction(org.apache.hadoop.hbase.master.balancer.BalanceAction arg0) -
wouldLowerAvailability
boolean wouldLowerAvailability(org.apache.hadoop.hbase.client.RegionInfo arg0, org.apache.hadoop.hbase.ServerName arg1) -
doAssignRegion
void doAssignRegion(org.apache.hadoop.hbase.client.RegionInfo arg0, org.apache.hadoop.hbase.ServerName arg1) -
regionMoved
void regionMoved(int arg0, int arg1, int arg2) -
removeRegion
int[] removeRegion(int[] arg0, int arg1) -
addRegion
int[] addRegion(int[] arg0, int arg1) -
addRegionSorted
int[] addRegionSorted(int[] arg0, int arg1) -
replaceRegion
int[] replaceRegion(int[] arg0, int arg1, int arg2) -
sortServersByRegionCount
void sortServersByRegionCount() -
getNumRegions
int getNumRegions(int arg0) -
getNumRegionsComparator
-
contains
boolean contains(int[] arg0, int arg1) -
getLowestLocalityRegionOnServer
int getLowestLocalityRegionOnServer(int arg0) -
getLocalityOfRegion
float getLocalityOfRegion(int arg0, int arg1) -
setNumRegions
void setNumRegions(int arg0) -
setNumMovedRegions
void setNumMovedRegions(int arg0) -
toString
-