Class DoNothingBalancer

java.lang.Object
org.apache.accumulo.core.spi.balancer.DoNothingBalancer
All Implemented Interfaces:
TabletBalancer

public class DoNothingBalancer extends Object implements TabletBalancer
A balancer that will do nothing and warn about doing nothing. This purpose of this balancer is as a fallback when attempts to create a balancer fail.
Since:
2.1.4
  • Constructor Details

    • DoNothingBalancer

      public DoNothingBalancer()
    • DoNothingBalancer

      public DoNothingBalancer(TableId tableId)
  • Method Details

    • init

      public void init(BalancerEnvironment balancerEnvironment)
      Description copied from interface: TabletBalancer
      Initialize the TabletBalancer. This gives the balancer the opportunity to read the configuration.
      Specified by:
      init in interface TabletBalancer
    • getAssignments

      public void getAssignments(TabletBalancer.AssignmentParameters params)
      Description copied from interface: TabletBalancer
      Assign tablets to tablet servers. This method is called whenever the manager finds tablets that are unassigned.
      Specified by:
      getAssignments in interface TabletBalancer
    • balance

      public long balance(TabletBalancer.BalanceParameters params)
      Description copied from interface: TabletBalancer
      Ask the balancer if any migrations are necessary. If the balancer is going to self-abort due to some environmental constraint (e.g. it requires some minimum number of tservers, or a maximum number of outstanding migrations), it should issue a log message to alert operators. The message should be at WARN normally and at ERROR if the balancer knows that the problem can not self correct. It should not issue these messages more than once a minute. This method will not be called when there are unassigned tablets.
      Specified by:
      balance in interface TabletBalancer
      Returns:
      the time, in milliseconds, to wait before re-balancing.