A class that helps orchestrate all the necessary steps for achieving a broker removal.
A broker removal consists of 4 steps:
0. (pre-requisite) Acquire a reservation on the Executor, aborting running tasks
1. Initial plan computation - validate that a plan can be computed successfully before taking any further steps.
2. Broker replica exclusion - make the broker ineligible to host new replicas, so any plan computed in the next step
will cover all replicas on the broker.
3. Actual plan computation - compute the plan which we'll execute to drain the broker
4. Plan execution - execute the partition reassignments to move replicas away from the broker (drain)
This builder class helps achieve the abstraction of handling success and failure conditions in
each of the 4 phases via 4 separate #
BrokerRemovalPhaseExecutor
s
that execute and handle failures for each phase.