You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ak...@apache.org on 2018/12/08 00:50:08 UTC

[incubator-pinot] branch master updated: [TE] Update alert schemes and suppressors in the annotation alert registry (#3590)

This is an automated email from the ASF dual-hosted git repository.

akshayrai09 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new feaca0a  [TE] Update alert schemes and suppressors in the annotation alert registry (#3590)
feaca0a is described below

commit feaca0a2eb5db5b028eaab1d74af35f9dd544f62
Author: Akshay Rai <ak...@gmail.com>
AuthorDate: Fri Dec 7 16:50:04 2018 -0800

    [TE] Update alert schemes and suppressors in the annotation alert registry (#3590)
---
 .../anomaly/ThirdEyeAnomalyApplication.java        |  6 +-
 .../dashboard/ThirdEyeDashboardApplication.java    |  6 +-
 .../alert/scheme/DetectionEmailAlerter.java        |  2 +
 .../DetectionAlertTimeWindowSuppressor.java        |  2 +
 ...ConfigurationResource.java => AlertScheme.java} | 27 +++---
 ...igurationResource.java => AlertSuppressor.java} | 27 +++---
 .../annotation/DetectionConfigurationResource.java |  1 +
 .../registry/DetectionAlertRegistry.java           | 99 ++++++++++++++++++++++
 .../{ => registry}/DetectionRegistry.java          |  5 +-
 .../yaml/CompositePipelineConfigTranslator.java    |  2 +-
 .../yaml/YamlDetectionAlertConfigTranslator.java   |  4 +-
 .../yaml/YamlDetectionTranslatorLoader.java        |  2 +-
 .../CompositePipelineConfigTranslatorTest.java     |  2 +-
 .../YamlDetectionAlertConfigTranslatorTest.java    |  3 +-
 14 files changed, 144 insertions(+), 44 deletions(-)

diff --git a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/anomaly/ThirdEyeAnomalyApplication.java b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/anomaly/ThirdEyeAnomalyApplication.java
index 888d632..ffe34dc 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/anomaly/ThirdEyeAnomalyApplication.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/anomaly/ThirdEyeAnomalyApplication.java
@@ -38,7 +38,8 @@ import com.linkedin.thirdeye.datasource.ThirdEyeCacheRegistry;
 import com.linkedin.thirdeye.datasource.pinot.resources.PinotDataSourceResource;
 import com.linkedin.thirdeye.detection.DetectionPipelineScheduler;
 import com.linkedin.thirdeye.detection.alert.DetectionAlertScheduler;
-import com.linkedin.thirdeye.detection.annotation.DetectionRegistry;
+import com.linkedin.thirdeye.detection.annotation.registry.DetectionAlertRegistry;
+import com.linkedin.thirdeye.detection.annotation.registry.DetectionRegistry;
 import com.linkedin.thirdeye.detector.email.filter.AlertFilterFactory;
 import com.linkedin.thirdeye.detector.function.AnomalyFunctionFactory;
 import com.linkedin.thirdeye.tracking.RequestStatisticsLogger;
@@ -113,8 +114,9 @@ public class ThirdEyeAnomalyApplication
       LOG.error("Exception while loading caches", e);
     }
 
-    // instantiate detection registry
+    // instantiate registry
     DetectionRegistry.init();
+    DetectionAlertRegistry.init();
 
     environment.getObjectMapper().enable(SerializationFeature.INDENT_OUTPUT);
     environment.getObjectMapper().registerModule(makeMapperModule());
diff --git a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/dashboard/ThirdEyeDashboardApplication.java b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/dashboard/ThirdEyeDashboardApplication.java
index 5014431..52831da 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/dashboard/ThirdEyeDashboardApplication.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/dashboard/ThirdEyeDashboardApplication.java
@@ -69,7 +69,8 @@ import com.linkedin.thirdeye.datasource.loader.TimeSeriesLoader;
 import com.linkedin.thirdeye.detection.DetectionMigrationResource;
 import com.linkedin.thirdeye.detection.DetectionResource;
 import com.linkedin.thirdeye.detection.annotation.DetectionConfigurationResource;
-import com.linkedin.thirdeye.detection.annotation.DetectionRegistry;
+import com.linkedin.thirdeye.detection.annotation.registry.DetectionAlertRegistry;
+import com.linkedin.thirdeye.detection.annotation.registry.DetectionRegistry;
 import com.linkedin.thirdeye.detection.yaml.YamlResource;
 import com.linkedin.thirdeye.detector.email.filter.AlertFilterFactory;
 import com.linkedin.thirdeye.detector.function.AnomalyFunctionFactory;
@@ -151,8 +152,9 @@ public class ThirdEyeDashboardApplication
       LOG.error("Exception while loading caches", e);
     }
 
-    // instantiate detection registry
+    // instantiate registry
     DetectionRegistry.init();
+    DetectionAlertRegistry.init();
 
     AnomalyFunctionFactory anomalyFunctionFactory = new AnomalyFunctionFactory(config.getFunctionConfigPath());
     AlertFilterFactory alertFilterFactory = new AlertFilterFactory(config.getAlertFilterConfigPath());
diff --git a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/scheme/DetectionEmailAlerter.java b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/scheme/DetectionEmailAlerter.java
index a956b90..53e6e91 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/scheme/DetectionEmailAlerter.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/scheme/DetectionEmailAlerter.java
@@ -32,6 +32,7 @@ import com.linkedin.thirdeye.detection.ConfigUtils;
 import com.linkedin.thirdeye.detection.alert.AlertUtils;
 import com.linkedin.thirdeye.detection.alert.DetectionAlertFilterRecipients;
 import com.linkedin.thirdeye.detection.alert.DetectionAlertFilterResult;
+import com.linkedin.thirdeye.detection.annotation.AlertScheme;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -50,6 +51,7 @@ import org.slf4j.LoggerFactory;
 import static com.linkedin.thirdeye.anomaly.SmtpConfiguration.SMTP_CONFIG_KEY;
 
 
+@AlertScheme(type = "EMAIL")
 public class DetectionEmailAlerter extends DetectionAlertScheme {
   private static final Logger LOG = LoggerFactory.getLogger(DetectionEmailAlerter.class);
 
diff --git a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/suppress/DetectionAlertTimeWindowSuppressor.java b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/suppress/DetectionAlertTimeWindowSuppressor.java
index 9fd5ded..d4a42ea 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/suppress/DetectionAlertTimeWindowSuppressor.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/suppress/DetectionAlertTimeWindowSuppressor.java
@@ -10,6 +10,7 @@ import com.linkedin.thirdeye.datalayer.dto.MergedAnomalyResultDTO;
 import com.linkedin.thirdeye.datasource.DAORegistry;
 import com.linkedin.thirdeye.detection.ConfigUtils;
 import com.linkedin.thirdeye.detection.alert.DetectionAlertFilterResult;
+import com.linkedin.thirdeye.detection.annotation.AlertSuppressor;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -27,6 +28,7 @@ import org.slf4j.LoggerFactory;
  * 2. Suppress alerts in the time window based on some thresholds.
  *    ({@link #EXPECTED_CHANGE_KEY} and {@link #ACCEPTABLE_DEVIATION_KEY})
  */
+@AlertSuppressor(type = "TIME_WINDOW")
 public class DetectionAlertTimeWindowSuppressor extends DetectionAlertSuppressor {
   private static final Logger LOG = LoggerFactory.getLogger(DetectionAlertTimeWindowSuppressor.class);
 
diff --git a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionConfigurationResource.java b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/AlertScheme.java
similarity index 51%
copy from thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionConfigurationResource.java
copy to thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/AlertScheme.java
index 2c3ee2d..517abc2 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionConfigurationResource.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/AlertScheme.java
@@ -16,22 +16,17 @@
 
 package com.linkedin.thirdeye.detection.annotation;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.wordnik.swagger.annotations.ApiParam;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Response;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 
 
-@Path("/detection/annotation")
-public class DetectionConfigurationResource {
-  private static ObjectMapper OBJECT_MAPPER = new ObjectMapper();
-  private static DetectionRegistry detectionRegistry = DetectionRegistry.getInstance();
-
-  @GET
-  public Response getConfigurations(@ApiParam("tag") String tag) throws Exception {
-    return Response.ok(
-        OBJECT_MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(detectionRegistry.getAllAnnotation()))
-        .build();
-  }
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface AlertScheme {
+  @JsonProperty String type() default "";
 }
diff --git a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionConfigurationResource.java b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/AlertSuppressor.java
similarity index 51%
copy from thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionConfigurationResource.java
copy to thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/AlertSuppressor.java
index 2c3ee2d..da5e0db 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionConfigurationResource.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/AlertSuppressor.java
@@ -16,22 +16,17 @@
 
 package com.linkedin.thirdeye.detection.annotation;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.wordnik.swagger.annotations.ApiParam;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Response;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 
 
-@Path("/detection/annotation")
-public class DetectionConfigurationResource {
-  private static ObjectMapper OBJECT_MAPPER = new ObjectMapper();
-  private static DetectionRegistry detectionRegistry = DetectionRegistry.getInstance();
-
-  @GET
-  public Response getConfigurations(@ApiParam("tag") String tag) throws Exception {
-    return Response.ok(
-        OBJECT_MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(detectionRegistry.getAllAnnotation()))
-        .build();
-  }
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface AlertSuppressor {
+  @JsonProperty String type() default "";
 }
diff --git a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionConfigurationResource.java b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionConfigurationResource.java
index 2c3ee2d..719d49c 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionConfigurationResource.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionConfigurationResource.java
@@ -17,6 +17,7 @@
 package com.linkedin.thirdeye.detection.annotation;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.linkedin.thirdeye.detection.annotation.registry.DetectionRegistry;
 import com.wordnik.swagger.annotations.ApiParam;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
diff --git a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/registry/DetectionAlertRegistry.java b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/registry/DetectionAlertRegistry.java
new file mode 100644
index 0000000..83efc22
--- /dev/null
+++ b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/registry/DetectionAlertRegistry.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2014-2018 LinkedIn Corp. (pinot-core@linkedin.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.linkedin.thirdeye.detection.annotation.registry;
+
+import com.google.common.base.Preconditions;
+import com.linkedin.thirdeye.detection.alert.scheme.DetectionAlertScheme;
+import com.linkedin.thirdeye.detection.alert.suppress.DetectionAlertSuppressor;
+import com.linkedin.thirdeye.detection.annotation.AlertScheme;
+import com.linkedin.thirdeye.detection.annotation.AlertSuppressor;
+import java.lang.annotation.Annotation;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import org.reflections.Reflections;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The detection alert registry.
+ */
+public class DetectionAlertRegistry {
+  private static final Logger LOG = LoggerFactory.getLogger(DetectionAlertRegistry.class);
+
+  // Alert Scheme type to Alert Scheme class name
+  private static final Map<String, String> ALERT_SCHEME_MAP = new HashMap<>();
+
+  // Alert Suppressor type to Alert Suppressor class name
+  private static final Map<String, String> ALERT_SUPPRESSOR_MAP = new HashMap<>();
+
+  private static final DetectionAlertRegistry INSTANCE = new DetectionAlertRegistry();
+
+  public static DetectionAlertRegistry getInstance() {
+    return INSTANCE;
+  }
+
+  /**
+   * Read all the alert schemes and suppressors and initialize the registry.
+   */
+  public static void init() {
+    try {
+      Reflections reflections = new Reflections();
+
+      // register alert schemes
+      Set<Class<? extends DetectionAlertScheme>> alertSchemeClasses =
+          reflections.getSubTypesOf(DetectionAlertScheme.class);
+      for (Class clazz : alertSchemeClasses) {
+        for (Annotation annotation : clazz.getAnnotations()) {
+          if (annotation instanceof AlertScheme) {
+            ALERT_SCHEME_MAP.put(((AlertScheme) annotation).type(), clazz.getName());
+          }
+        }
+      }
+
+      // register alert suppressors
+      Set<Class<? extends DetectionAlertSuppressor>> alertSuppressorClasses =
+          reflections.getSubTypesOf(DetectionAlertSuppressor.class);
+      for (Class clazz : alertSuppressorClasses) {
+        for (Annotation annotation : clazz.getAnnotations()) {
+          if (annotation instanceof AlertSuppressor) {
+            ALERT_SUPPRESSOR_MAP.put(((AlertSuppressor) annotation).type(), clazz.getName());
+          }
+        }
+      }
+    } catch (Exception e) {
+      LOG.warn("initialize detection registry error", e);
+    }
+  }
+
+  /**
+   * Look up the {@link #ALERT_SCHEME_MAP} for the Alert scheme class name from the type
+   */
+  public String lookupAlertSchemes(String schemeType) {
+    Preconditions.checkArgument(ALERT_SCHEME_MAP.containsKey(schemeType), schemeType + " not found in registry");
+    return ALERT_SCHEME_MAP.get(schemeType);
+  }
+
+  /**
+   * Look up the {@link #ALERT_SUPPRESSOR_MAP} for the Alert suppressor class name from the type
+   */
+  public String lookupAlertSuppressors(String suppressorType) {
+    Preconditions.checkArgument(ALERT_SUPPRESSOR_MAP.containsKey(suppressorType), suppressorType + " not found in registry");
+    return ALERT_SUPPRESSOR_MAP.get(suppressorType);
+  }
+}
diff --git a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionRegistry.java b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/registry/DetectionRegistry.java
similarity index 95%
rename from thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionRegistry.java
rename to thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/registry/DetectionRegistry.java
index 7741eb1..5d859b6 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/DetectionRegistry.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/annotation/registry/DetectionRegistry.java
@@ -14,10 +14,13 @@
  * limitations under the License.
  */
 
-package com.linkedin.thirdeye.detection.annotation;
+package com.linkedin.thirdeye.detection.annotation.registry;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableMap;
+import com.linkedin.thirdeye.detection.annotation.Components;
+import com.linkedin.thirdeye.detection.annotation.Tune;
+import com.linkedin.thirdeye.detection.annotation.Yaml;
 import com.linkedin.thirdeye.detection.spi.components.BaseComponent;
 import com.linkedin.thirdeye.detection.yaml.YamlDetectionConfigTranslator;
 import java.lang.annotation.Annotation;
diff --git a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/CompositePipelineConfigTranslator.java b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/CompositePipelineConfigTranslator.java
index 45cad5b..b9f6710 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/CompositePipelineConfigTranslator.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/CompositePipelineConfigTranslator.java
@@ -13,7 +13,7 @@ import com.linkedin.thirdeye.detection.DataProvider;
 import com.linkedin.thirdeye.detection.DefaultInputDataFetcher;
 import com.linkedin.thirdeye.detection.InputDataFetcher;
 import com.linkedin.thirdeye.detection.algorithm.DimensionWrapper;
-import com.linkedin.thirdeye.detection.annotation.DetectionRegistry;
+import com.linkedin.thirdeye.detection.annotation.registry.DetectionRegistry;
 import com.linkedin.thirdeye.detection.annotation.Yaml;
 import com.linkedin.thirdeye.detection.spec.AbstractSpec;
 import com.linkedin.thirdeye.detection.spi.components.Tunable;
diff --git a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionAlertConfigTranslator.java b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionAlertConfigTranslator.java
index 65d7196..1caa94a 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionAlertConfigTranslator.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionAlertConfigTranslator.java
@@ -2,7 +2,7 @@ package com.linkedin.thirdeye.detection.yaml;
 
 import com.google.common.base.Preconditions;
 import com.linkedin.thirdeye.datalayer.dto.DetectionAlertConfigDTO;
-import com.linkedin.thirdeye.detection.annotation.DetectionRegistry;
+import com.linkedin.thirdeye.detection.annotation.registry.DetectionRegistry;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
@@ -79,4 +79,4 @@ public class YamlDetectionAlertConfigTranslator {
       }
     }
   }
-}
+}
\ No newline at end of file
diff --git a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionTranslatorLoader.java b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionTranslatorLoader.java
index 0d6b231..acea6a9 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionTranslatorLoader.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionTranslatorLoader.java
@@ -1,7 +1,7 @@
 package com.linkedin.thirdeye.detection.yaml;
 
 import com.linkedin.thirdeye.detection.DataProvider;
-import com.linkedin.thirdeye.detection.annotation.DetectionRegistry;
+import com.linkedin.thirdeye.detection.annotation.registry.DetectionRegistry;
 import java.lang.reflect.Constructor;
 import java.util.Map;
 
diff --git a/thirdeye/thirdeye-pinot/src/test/java/com/linkedin/thirdeye/detection/yaml/CompositePipelineConfigTranslatorTest.java b/thirdeye/thirdeye-pinot/src/test/java/com/linkedin/thirdeye/detection/yaml/CompositePipelineConfigTranslatorTest.java
index 3abce8b..d57d772 100644
--- a/thirdeye/thirdeye-pinot/src/test/java/com/linkedin/thirdeye/detection/yaml/CompositePipelineConfigTranslatorTest.java
+++ b/thirdeye/thirdeye-pinot/src/test/java/com/linkedin/thirdeye/detection/yaml/CompositePipelineConfigTranslatorTest.java
@@ -6,7 +6,7 @@ import com.linkedin.thirdeye.datalayer.dto.DatasetConfigDTO;
 import com.linkedin.thirdeye.datalayer.dto.MetricConfigDTO;
 import com.linkedin.thirdeye.detection.DataProvider;
 import com.linkedin.thirdeye.detection.MockDataProvider;
-import com.linkedin.thirdeye.detection.annotation.DetectionRegistry;
+import com.linkedin.thirdeye.detection.annotation.registry.DetectionRegistry;
 import com.linkedin.thirdeye.detection.components.RuleBaselineProvider;
 import com.linkedin.thirdeye.detection.components.ThresholdRuleAnomalyFilter;
 import com.linkedin.thirdeye.detection.components.ThresholdRuleDetector;
diff --git a/thirdeye/thirdeye-pinot/src/test/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionAlertConfigTranslatorTest.java b/thirdeye/thirdeye-pinot/src/test/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionAlertConfigTranslatorTest.java
index a8b148b..29d3ead 100644
--- a/thirdeye/thirdeye-pinot/src/test/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionAlertConfigTranslatorTest.java
+++ b/thirdeye/thirdeye-pinot/src/test/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionAlertConfigTranslatorTest.java
@@ -1,8 +1,7 @@
 package com.linkedin.thirdeye.detection.yaml;
 
 import com.linkedin.thirdeye.datalayer.dto.DetectionAlertConfigDTO;
-import com.linkedin.thirdeye.detection.alert.filter.ToAllRecipientsDetectionAlertFilter;
-import com.linkedin.thirdeye.detection.annotation.DetectionRegistry;
+import com.linkedin.thirdeye.detection.annotation.registry.DetectionRegistry;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org