Class TestCacheAwareLoadBalancerCostFunctions.MockClusterForCacheCost
java.lang.Object
org.apache.hadoop.hbase.master.balancer.TestCacheAwareLoadBalancerCostFunctions.MockClusterForCacheCost
- Enclosing class:
- TestCacheAwareLoadBalancerCostFunctions
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
org.apache.hadoop.hbase.master.balancer.BalancerClusterState.DefaultRackManager
(package private) static enum
org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType
-
Field Summary
Modifier 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
-
Method Summary
Modifier and TypeMethodDescription(package private) int[]
addRegion
(int[] arg0, int arg1) (package private) int[]
addRegionSorted
(int[] arg0, int arg1) (package private) boolean
contains
(int[] arg0, int arg1) void
doAction
(org.apache.hadoop.hbase.master.balancer.BalanceAction arg0) (package private) void
doAssignRegion
(org.apache.hadoop.hbase.client.RegionInfo arg0, org.apache.hadoop.hbase.ServerName arg1) (package private) float
getLocalityOfRegion
(int arg0, int arg1) (package private) int
getLowestLocalityRegionOnServer
(int arg0) (package private) int
getNumRegions
(int arg0) float
getOrComputeLocality
(int arg0, int arg1, org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg2) float[][]
protected float
getOrComputeRegionCacheRatio
(int arg0, int arg1) int[]
getOrComputeRegionsToMostLocalEntities
(org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg0) int[]
double
getOrComputeWeightedLocality
(int arg0, int arg1, org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg2) float
getOrComputeWeightedRegionCacheRatio
(int arg0, int arg1) int
getRackForRegion
(int arg0) protected float
getRegionCacheRatioOnRegionServer
(int region, int regionServerIndex) int
getRegionSizeMB
(int arg0) int
getTotalRegionHFileSizeMB
(int region) (package private) void
regionMoved
(int arg0, int arg1, int arg2) (package private) int[]
removeRegion
(int[] arg0, int arg1) (package private) int[]
replaceRegion
(int[] arg0, int arg1, int arg2) boolean
serverHasTooFewRegions
(int arg0) (package private) void
setNumMovedRegions
(int arg0) (package private) void
setNumRegions
(int arg0) (package private) void
toString()
(package private) boolean
wouldLowerAvailability
(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
-