You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xh...@apache.org on 2019/07/31 19:20:09 UTC

[incubator-pinot] branch master updated: [TE] Remove hard-coded AdLibAnomalyDetector and AdLibAlertFilter (#4477)

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

xhsun 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 bc268f1  [TE] Remove hard-coded AdLibAnomalyDetector and AdLibAlertFilter (#4477)
bc268f1 is described below

commit bc268f19eb3055f6813c5001f5582e78e6085c34
Author: Xiaohui Sun <xh...@linkedin.com>
AuthorDate: Wed Jul 31 12:20:03 2019 -0700

    [TE] Remove hard-coded AdLibAnomalyDetector and AdLibAlertFilter (#4477)
---
 .../thirdeye/detection/annotation/registry/DetectionRegistry.java | 7 +++++++
 .../pinot/thirdeye/detection/yaml/DetectionConfigTuner.java       | 8 --------
 .../detection/yaml/translator/DetectionConfigTranslator.java      | 7 -------
 3 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/annotation/registry/DetectionRegistry.java b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/annotation/registry/DetectionRegistry.java
index d7f8070..3913969 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/annotation/registry/DetectionRegistry.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/annotation/registry/DetectionRegistry.java
@@ -91,6 +91,13 @@ public class DetectionRegistry {
           }
         }
       }
+      // todo: get rid of MIGRATED_ALGORITHM and MIGRATED_ALGORITHM_FILTER after the migration is completed
+      if (REGISTRY_MAP.containsKey("ALGORITHM")) {
+        REGISTRY_MAP.put("MIGRATED_ALGORITHM", REGISTRY_MAP.get("ALGORITHM"));
+      }
+      if (REGISTRY_MAP.containsKey("ALGORITHM_FILTER")) {
+        REGISTRY_MAP.put("MIGRATED_ALGORITHM_FILTER", REGISTRY_MAP.get("ALGORITHM_FILTER"));
+      }
     } catch (Exception e) {
       LOG.warn("initialize detection registry error", e);
     }
diff --git a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/DetectionConfigTuner.java b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/DetectionConfigTuner.java
index 88716c5..b3a91d5 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/DetectionConfigTuner.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/DetectionConfigTuner.java
@@ -59,14 +59,6 @@ public class DetectionConfigTuner {
   private static final String DEFAULT_TIMEZONE = "America/Los_Angeles";
 
   private static final DetectionRegistry DETECTION_REGISTRY = DetectionRegistry.getInstance();
-  static {
-    // do not tune for alerts migrated from legacy anomaly function.
-    DetectionRegistry.registerComponent("com.linkedin.thirdeye.detection.components.AdLibAlertFilter",
-        "MIGRATED_ALGORITHM_FILTER");
-    DetectionRegistry.registerComponent("com.linkedin.thirdeye.detection.components.AdLibAnomalyDetector",
-        "MIGRATED_ALGORITHM");
-  }
-
   public static final String PROP_YAML_PARAMS = "yamlParams";
   public static final Set<String> TURNOFF_TUNING_COMPONENTS =
       ImmutableSet.of("MIGRATED_ALGORITHM_FILTER", "MIGRATED_ALGORITHM", "MIGRATED_ALGORITHM_BASELINE");
diff --git a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/DetectionConfigTranslator.java b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/DetectionConfigTranslator.java
index cca68d1..f32578e 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/DetectionConfigTranslator.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/DetectionConfigTranslator.java
@@ -165,13 +165,6 @@ public class DetectionConfigTranslator extends ConfigTranslator<DetectionConfigD
 
 
   private static final DetectionRegistry DETECTION_REGISTRY = DetectionRegistry.getInstance();
-  static {
-    // do not tune for alerts migrated from legacy anomaly function.
-    DetectionRegistry.registerComponent("com.linkedin.thirdeye.detection.components.AdLibAlertFilter",
-        "MIGRATED_ALGORITHM_FILTER");
-    DetectionRegistry.registerComponent("com.linkedin.thirdeye.detection.components.AdLibAnomalyDetector",
-        "MIGRATED_ALGORITHM");
-  }
   private static final Set<String> MOVING_WINDOW_DETECTOR_TYPES = ImmutableSet.of("ALGORITHM", "MIGRATED_ALGORITHM");
 
   private final Map<String, Object> components = new HashMap<>();


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