Class DummyClusterInfoProvider

java.lang.Object
org.apache.hadoop.hbase.master.balancer.DummyClusterInfoProvider
All Implemented Interfaces:
org.apache.hadoop.hbase.conf.ConfigurationObserver, org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider

public class DummyClusterInfoProvider extends Object implements org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
  • Field Details

    • conf

      private volatile org.apache.hadoop.conf.Configuration conf
  • Constructor Details

  • Method Details

    • getConfiguration

      public org.apache.hadoop.conf.Configuration getConfiguration()
      Specified by:
      getConfiguration in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
    • getConnection

      public org.apache.hadoop.hbase.client.Connection getConnection()
      Specified by:
      getConnection in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
    • getAssignedRegions

      public List<org.apache.hadoop.hbase.client.RegionInfo> getAssignedRegions()
      Specified by:
      getAssignedRegions in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
    • unassign

      public void unassign(org.apache.hadoop.hbase.client.RegionInfo regionInfo) throws IOException
      Specified by:
      unassign in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
      Throws:
      IOException
    • getTableDescriptor

      public org.apache.hadoop.hbase.client.TableDescriptor getTableDescriptor(org.apache.hadoop.hbase.TableName tableName) throws IOException
      Specified by:
      getTableDescriptor in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
      Throws:
      IOException
    • getNumberOfTables

      public int getNumberOfTables() throws IOException
      Specified by:
      getNumberOfTables in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
      Throws:
      IOException
    • computeHDFSBlocksDistribution

      public org.apache.hadoop.hbase.HDFSBlocksDistribution computeHDFSBlocksDistribution(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.TableDescriptor tableDescriptor, org.apache.hadoop.hbase.client.RegionInfo regionInfo) throws IOException
      Specified by:
      computeHDFSBlocksDistribution in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
      Throws:
      IOException
    • hasRegionReplica

      public boolean hasRegionReplica(Collection<org.apache.hadoop.hbase.client.RegionInfo> regions) throws IOException
      Specified by:
      hasRegionReplica in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
      Throws:
      IOException
    • getOnlineServersList

      public List<org.apache.hadoop.hbase.ServerName> getOnlineServersList()
      Specified by:
      getOnlineServersList in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
    • getOnlineServersListWithPredicator

      public List<org.apache.hadoop.hbase.ServerName> getOnlineServersListWithPredicator(List<org.apache.hadoop.hbase.ServerName> servers, Predicate<org.apache.hadoop.hbase.ServerMetrics> filter)
      Specified by:
      getOnlineServersListWithPredicator in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
    • getSnapShotOfAssignment

      public Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> getSnapShotOfAssignment(Collection<org.apache.hadoop.hbase.client.RegionInfo> regions)
      Specified by:
      getSnapShotOfAssignment in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
    • isOffPeakHour

      public boolean isOffPeakHour()
      Specified by:
      isOffPeakHour in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
    • recordBalancerDecision

      public void recordBalancerDecision(Supplier<org.apache.hadoop.hbase.client.BalancerDecision> decision)
      Specified by:
      recordBalancerDecision in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
    • recordBalancerRejection

      public void recordBalancerRejection(Supplier<org.apache.hadoop.hbase.client.BalancerRejection> rejection)
      Specified by:
      recordBalancerRejection in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider
    • onConfigurationChange

      public void onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
      Specified by:
      onConfigurationChange in interface org.apache.hadoop.hbase.conf.ConfigurationObserver
    • getLoad

      public org.apache.hadoop.hbase.ServerMetrics getLoad(org.apache.hadoop.hbase.ServerName serverName)
      Specified by:
      getLoad in interface org.apache.hadoop.hbase.master.balancer.ClusterInfoProvider