public class AnomalyDetector extends Object
Constructor and Description |
---|
AnomalyDetector(KafkaCruiseControlConfig config,
org.apache.kafka.clients.admin.ConfluentAdmin adminClient,
LoadMonitor loadMonitor,
KafkaCruiseControl kafkaCruiseControl,
org.apache.kafka.common.utils.Time time,
DataBalancerMetricsRegistry metricRegistry,
ApiStatePersistenceStore persistenceStore) |
Modifier and Type | Method and Description |
---|---|
AnomalyDetectorState |
anomalyDetectorState() |
EvenClusterLoadStateManager |
init(Integer brokerId,
KafkaCruiseControl.CcStartupMode startupMode) |
void |
markSelfHealingFinished(String anomalyId)
Update anomaly status once associated self-healing operation has finished.
|
void |
maybeClearOngoingAnomalyDetectionTimeMs()
|
void |
notifyDeadBrokers(Set<Integer> deadBrokers) |
void |
notifyNewBrokers(Set<Integer> newBrokers) |
long |
numCheckedWithDelay() |
boolean |
setSelfHealingFor(AnomalyType anomalyType,
boolean isSelfHealingEnabled)
(1) Enable or disable self healing for the given anomaly type and (2) update the cached anomaly detector state.
|
void |
shutdown()
Shutdown the anomaly detector.
|
void |
startDetection() |
public AnomalyDetector(KafkaCruiseControlConfig config, org.apache.kafka.clients.admin.ConfluentAdmin adminClient, LoadMonitor loadMonitor, KafkaCruiseControl kafkaCruiseControl, org.apache.kafka.common.utils.Time time, DataBalancerMetricsRegistry metricRegistry, ApiStatePersistenceStore persistenceStore)
public EvenClusterLoadStateManager init(Integer brokerId, KafkaCruiseControl.CcStartupMode startupMode)
public void startDetection()
public void shutdown()
public AnomalyDetectorState anomalyDetectorState()
public void maybeClearOngoingAnomalyDetectionTimeMs()
public boolean setSelfHealingFor(AnomalyType anomalyType, boolean isSelfHealingEnabled)
anomalyType
- Type of anomaly for which to enable or disable self healing.isSelfHealingEnabled
- True if self healing is enabled, false otherwise.public long numCheckedWithDelay()
public void markSelfHealingFinished(String anomalyId)
anomalyId
- Unique id of anomaly which triggered self-healing operation.