private class TestStochasticLoadBalancer.MockCluster extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
org.apache.hadoop.hbase.master.balancer.BalancerClusterState.DefaultRackManager |
(package private) static class |
org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType |
Modifier and Type | Field and Description |
---|---|
(package private) Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> |
clusterState |
(package private) org.agrona.collections.Int2IntCounterMap[] |
colocatedReplicaCountsPerHost |
(package private) org.agrona.collections.Int2IntCounterMap[] |
colocatedReplicaCountsPerRack |
(package private) org.agrona.collections.Int2IntCounterMap[] |
colocatedReplicaCountsPerServer |
(package private) boolean |
hasRegionReplicas |
(package private) String[] |
hosts |
(package private) Map<String,Integer> |
hostsToIndex |
(package private) int[] |
initialRegionIndexToServerIndex |
private int[][] |
localities |
(package private) float[] |
localityPerServer |
(package private) boolean |
multiServersPerHost |
(package private) int |
numHosts |
(package private) int[] |
numMaxRegionsPerTable |
(package private) int |
numMovedRegions |
(package private) int |
numRacks |
(package private) int |
numRegions |
(package private) int[][] |
numRegionsPerServerPerTable |
(package private) int[] |
numRegionsPerTable |
(package private) int |
numServers |
(package private) int |
numTables |
(package private) String[] |
racks |
(package private) Map<String,Integer> |
racksToIndex |
(package private) int[] |
regionIndexToPrimaryIndex |
(package private) int[] |
regionIndexToServerIndex |
(package private) int[] |
regionIndexToTableIndex |
(package private) Deque<org.apache.hadoop.hbase.master.balancer.BalancerRegionLoad>[] |
regionLoads |
(package private) int[][] |
regionLocations |
(package private) org.apache.hadoop.hbase.client.RegionInfo[] |
regions |
(package private) int[][] |
regionsPerHost |
(package private) int[][] |
regionsPerRack |
(package private) int[][] |
regionsPerServer |
(package private) Map<org.apache.hadoop.hbase.client.RegionInfo,Integer> |
regionsToIndex |
(package private) int[] |
serverIndexToHostIndex |
(package private) int[] |
serverIndexToRackIndex |
(package private) int[] |
serverIndexToRegionsOffset |
(package private) Integer[] |
serverIndicesSortedByLocality |
(package private) Integer[] |
serverIndicesSortedByRegionCount |
(package private) org.apache.hadoop.hbase.ServerName[] |
servers |
(package private) int[][] |
serversPerHost |
(package private) int[][] |
serversPerRack |
(package private) Map<org.apache.hadoop.hbase.net.Address,Integer> |
serversToIndex |
(package private) ArrayList<String> |
tables |
(package private) Map<String,Integer> |
tablesToIndex |
Constructor and Description |
---|
MockCluster(int[][] regions) |
Modifier and Type | Method and Description |
---|---|
(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 region,
int server) |
(package private) int |
getLowestLocalityRegionOnServer(int arg0) |
(package private) int |
getNumRegions(int arg0) |
Comparator<Integer> |
getNumRegionsComparator() |
float |
getOrComputeLocality(int arg0,
int arg1,
org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg2) |
float[][] |
getOrComputeRackLocalities() |
int[] |
getOrComputeRegionsToMostLocalEntities(org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg0) |
double |
getOrComputeWeightedLocality(int arg0,
int arg1,
org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg2) |
int |
getRackForRegion(int arg0) |
int |
getRegionSizeMB(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 |
sortServersByRegionCount() |
String |
toString() |
(package private) boolean |
wouldLowerAvailability(org.apache.hadoop.hbase.client.RegionInfo arg0,
org.apache.hadoop.hbase.ServerName arg1) |
private int[][] localities
org.apache.hadoop.hbase.ServerName[] servers
boolean multiServersPerHost
org.apache.hadoop.hbase.client.RegionInfo[] regions
Deque<org.apache.hadoop.hbase.master.balancer.BalancerRegionLoad>[] regionLoads
int[][] regionLocations
int[] serverIndexToHostIndex
int[] serverIndexToRackIndex
int[][] regionsPerServer
int[] serverIndexToRegionsOffset
int[][] regionsPerHost
int[][] regionsPerRack
org.agrona.collections.Int2IntCounterMap[] colocatedReplicaCountsPerServer
org.agrona.collections.Int2IntCounterMap[] colocatedReplicaCountsPerHost
org.agrona.collections.Int2IntCounterMap[] colocatedReplicaCountsPerRack
int[][] serversPerHost
int[][] serversPerRack
int[] regionIndexToServerIndex
int[] initialRegionIndexToServerIndex
int[] regionIndexToTableIndex
int[][] numRegionsPerServerPerTable
int[] numRegionsPerTable
int[] numMaxRegionsPerTable
int[] regionIndexToPrimaryIndex
boolean hasRegionReplicas
Integer[] serverIndicesSortedByRegionCount
Integer[] serverIndicesSortedByLocality
Map<org.apache.hadoop.hbase.net.Address,Integer> serversToIndex
Map<String,Integer> hostsToIndex
Map<String,Integer> racksToIndex
Map<String,Integer> tablesToIndex
Map<org.apache.hadoop.hbase.client.RegionInfo,Integer> regionsToIndex
float[] localityPerServer
int numServers
int numHosts
int numRacks
int numTables
int numRegions
int numMovedRegions
Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> clusterState
public MockCluster(int[][] regions)
float getLocalityOfRegion(int region, int server)
public int getRegionSizeMB(int region)
public boolean serverHasTooFewRegions(int arg0)
public float[][] getOrComputeRackLocalities()
public int[] getOrComputeRegionsToMostLocalEntities(org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg0)
public float getOrComputeLocality(int arg0, int arg1, org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg2)
public double getOrComputeWeightedLocality(int arg0, int arg1, org.apache.hadoop.hbase.master.balancer.BalancerClusterState.LocalityType arg2)
public int getRackForRegion(int arg0)
public void doAction(org.apache.hadoop.hbase.master.balancer.BalanceAction arg0)
boolean wouldLowerAvailability(org.apache.hadoop.hbase.client.RegionInfo arg0, org.apache.hadoop.hbase.ServerName arg1)
void doAssignRegion(org.apache.hadoop.hbase.client.RegionInfo arg0, org.apache.hadoop.hbase.ServerName arg1)
void regionMoved(int arg0, int arg1, int arg2)
int[] removeRegion(int[] arg0, int arg1)
int[] addRegion(int[] arg0, int arg1)
int[] addRegionSorted(int[] arg0, int arg1)
int[] replaceRegion(int[] arg0, int arg1, int arg2)
void sortServersByRegionCount()
int getNumRegions(int arg0)
public Comparator<Integer> getNumRegionsComparator()
boolean contains(int[] arg0, int arg1)
int getLowestLocalityRegionOnServer(int arg0)
void setNumRegions(int arg0)
void setNumMovedRegions(int arg0)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.