Package org.apache.hadoop.hbase.client
Class BalanceResponse.Builder
java.lang.Object
org.apache.hadoop.hbase.client.BalanceResponse.Builder
- Enclosing class:
- BalanceResponse
Used in HMaster to build a
BalanceResponse
for returning results of a balance
invocation to callers-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private int
private int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theBalanceResponse
setBalancerRan
(boolean balancerRan) Set true if the balancer ran, otherwise false.setMovesCalculated
(int movesCalculated) Set how many moves were calculated by the balancer.setMovesExecuted
(int movesExecuted) Set how many of the calculated moves were actually executed by the balancer.
-
Field Details
-
balancerRan
-
movesCalculated
-
movesExecuted
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
setBalancerRan
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
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
Set how many of the calculated moves were actually executed by the balancer. This should be zero if the balancer is run withBalanceRequest.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 theBalanceResponse
-