Class TestCacheAwareLoadBalancerCostFunctions.MockClusterForCacheCost

java.lang.Object
org.apache.hadoop.hbase.master.balancer.TestCacheAwareLoadBalancerCostFunctions.MockClusterForCacheCost
Enclosing class:
TestCacheAwareLoadBalancerCostFunctions

  • Field Details

    • regionServerCacheRatio

      private final Map<org.apache.hadoop.hbase.util.Pair<Integer,Integer>,Float> regionServerCacheRatio
    • servers

      org.apache.hadoop.hbase.ServerName[] servers
    • hosts

      String[] hosts
    • racks

      String[] racks
    • multiServersPerHost

      boolean multiServersPerHost
    • tables

      ArrayList<String> 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

      Map<org.apache.hadoop.hbase.net.Address,Integer> serversToIndex
    • hostsToIndex

      Map<String,Integer> hostsToIndex
    • racksToIndex

      Map<String,Integer> racksToIndex
    • tablesToIndex

      Map<String,Integer> tablesToIndex
    • regionsToIndex

      Map<org.apache.hadoop.hbase.client.RegionInfo,Integer> regionsToIndex
    • localityPerServer

      float[] localityPerServer
    • numServers

      int numServers
    • numHosts

      int numHosts
    • numRacks

      int numRacks
    • numTables

      int numTables
    • numRegions

      int numRegions
    • numMovedRegions

      int numMovedRegions
    • clusterState

      Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> clusterState
    • regionCacheRatioOnOldServerMap

      Map<String,org.apache.hadoop.hbase.util.Pair<org.apache.hadoop.hbase.ServerName,Float>> regionCacheRatioOnOldServerMap
  • Constructor Details

  • Method Details

    • getTotalRegionHFileSizeMB

      public int getTotalRegionHFileSizeMB(int region)
    • getRegionCacheRatioOnRegionServer

      protected float getRegionCacheRatioOnRegionServer(int region, int regionServerIndex)
    • 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

      public Comparator<Integer> 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

      public String toString()
      Overrides:
      toString in class Object