Class BalanceResponse.Builder

java.lang.Object
org.apache.hadoop.hbase.client.BalanceResponse.Builder
Enclosing class:
BalanceResponse

@Private public static final class BalanceResponse.Builder extends Object
Used in HMaster to build a BalanceResponse for returning results of a balance invocation to callers
  • Field Details

  • Constructor Details

  • Method Details

    • setBalancerRan

      public BalanceResponse.Builder setBalancerRan(boolean balancerRan)
      Set true if the balancer ran, otherwise false. The balancer may not run in some circumstances, such as if a balance is already running or there are regions already in transition.
      Parameters:
      balancerRan - true if balancer ran, false otherwise
    • setMovesCalculated

      public BalanceResponse.Builder setMovesCalculated(int movesCalculated)
      Set how many moves were calculated by the balancer. This will be zero if the cluster is already balanced.
      Parameters:
      movesCalculated - moves calculated by the balance run
    • setMovesExecuted

      public BalanceResponse.Builder setMovesExecuted(int movesExecuted)
      Set how many of the calculated moves were actually executed by the balancer. This should be zero if the balancer is run with BalanceRequest.isDryRun(). It may also not equal movesCalculated if the balancer ran out of time while executing the moves.
      Parameters:
      movesExecuted - moves executed by the balance run
    • build

      Build the BalanceResponse