public class AnomalyDetector
extends java.lang.Object
Constructor and Description |
---|
AnomalyDetector(KafkaCruiseControlConfig config,
scala.Option<org.apache.zookeeper.client.ZKClientConfig> zkClientConfig,
LoadMonitor loadMonitor,
KafkaCruiseControl kafkaCruiseControl,
org.apache.kafka.common.utils.Time time,
DataBalancerMetricsRegistry metricRegistry) |
Modifier and Type | Method and Description |
---|---|
AnomalyDetectorState |
anomalyDetectorState() |
void |
markSelfHealingFinished(java.lang.String anomalyId)
Update anomaly status once associated self-healing operation has finished.
|
void |
maybeClearOngoingAnomalyDetectionTimeMs()
|
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, scala.Option<org.apache.zookeeper.client.ZKClientConfig> zkClientConfig, LoadMonitor loadMonitor, KafkaCruiseControl kafkaCruiseControl, org.apache.kafka.common.utils.Time time, DataBalancerMetricsRegistry metricRegistry)
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(java.lang.String anomalyId)
anomalyId
- Unique id of anomaly which triggered self-healing operation.