public class ConfluentDataBalanceEngineContext extends java.lang.Object implements DataBalanceEngineContext
Constructor and Description |
---|
ConfluentDataBalanceEngineContext(DataBalancerMetricsRegistry dataBalancerMetricsRegistry,
KafkaCruiseControl cruiseControl,
org.apache.kafka.common.utils.Time time) |
Modifier and Type | Method and Description |
---|---|
BrokerRemovalFuture |
brokerRemovalFuture(int brokerId) |
void |
closeAndClearState() |
java.util.Map<java.lang.Integer,BrokerRemovalStateTracker> |
getBrokerRemovalsStateTrackers()
Return the #
BrokerRemovalStateTracker for the active broker removal operations |
KafkaCruiseControl |
getCruiseControl() |
DataBalancerMetricsRegistry |
getDataBalancerMetricsRegistry() |
ApiStatePersistenceStore |
getPersistenceStore()
Return persistence store associated with this DataBalanceEngineContext.
|
org.apache.kafka.common.utils.Time |
getTime() |
boolean |
isCruiseControlInitialized() |
void |
putBrokerRemovalFuture(int brokerId,
BrokerRemovalFuture future)
Store a future of the broker removal operation in memory
|
void |
removeBrokerRemovalFuture(int brokerId)
Clean up a stored (in memory) future of the broker removal operation
|
void |
setCruiseControl(KafkaCruiseControl cruiseControl) |
void |
setPersistenceStore(ApiStatePersistenceStore persistenceStore) |
public ConfluentDataBalanceEngineContext(DataBalancerMetricsRegistry dataBalancerMetricsRegistry, KafkaCruiseControl cruiseControl, org.apache.kafka.common.utils.Time time)
public KafkaCruiseControl getCruiseControl()
public boolean isCruiseControlInitialized()
public void setCruiseControl(KafkaCruiseControl cruiseControl)
public org.apache.kafka.common.utils.Time getTime()
public DataBalancerMetricsRegistry getDataBalancerMetricsRegistry()
public ApiStatePersistenceStore getPersistenceStore()
DataBalanceEngineContext
getPersistenceStore
in interface DataBalanceEngineContext
public java.util.Map<java.lang.Integer,BrokerRemovalStateTracker> getBrokerRemovalsStateTrackers()
BrokerRemovalStateTracker
for the active broker removal operationsgetBrokerRemovalsStateTrackers
in interface DataBalanceEngineContext
public void setPersistenceStore(ApiStatePersistenceStore persistenceStore)
public void putBrokerRemovalFuture(int brokerId, BrokerRemovalFuture future)
brokerId
- the id of the brokerfuture
- a #BrokerRemovalFuture
for the full broker removal operation of broker #brokerId
public void removeBrokerRemovalFuture(int brokerId)
public BrokerRemovalFuture brokerRemovalFuture(int brokerId)
Future
for the full broker removal operation of broker #brokerId
-
the plan computation/shutdown operation and then the underlying reassignments executionpublic void closeAndClearState()