xiaohui-sun commented on a change in pull request #3595: [TE] Translator - Yaml 
Alert Config to DetectionAlertConfigDTO
URL: https://github.com/apache/incubator-pinot/pull/3595#discussion_r240316040
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/yaml/YamlDetectionAlertConfigTranslator.java
 ##########
 @@ -1,31 +1,59 @@
 package com.linkedin.thirdeye.detection.yaml;
 
+import com.google.common.base.CaseFormat;
 import com.google.common.base.Preconditions;
 import com.linkedin.thirdeye.datalayer.dto.DetectionAlertConfigDTO;
+import com.linkedin.thirdeye.datalayer.pojo.AlertConfigBean;
+import com.linkedin.thirdeye.detection.ConfigUtils;
+import 
com.linkedin.thirdeye.detection.annotation.registry.DetectionAlertRegistry;
 import com.linkedin.thirdeye.detection.annotation.registry.DetectionRegistry;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import org.apache.commons.collections.MapUtils;
 
 
-
 /**
  * The translator converts the alert yaml config into a detection alert config
- * TODO Refactor this to support alert schemes
  */
 public class YamlDetectionAlertConfigTranslator {
-  private static final String PROP_NAME = "name";
-  private static final String PROP_CRON = "cron";
-  private static final String PROP_APPLICATION = "application";
-  private static final String PROP_TYPE = "type";
-  private static final String PROP_CLASS_NAME = "className";
-  private static final String PROP_DETECTION_CONFIG_ID = "detectionConfigIds";
-  private static final String CRON_SCHEDULE_DEFAULT = "0 21 * * * ? *";
+  static final String PROP_SUBS_GROUP_NAME = "subscriptionGroupName";
+  static final String PROP_CRON = "cron";
+  static final String PROP_ACTIVE = "active";
+  static final String PROP_APPLICATION = "application";
+  static final String PROP_FROM = "fromAddress";
+  static final String PROP_ONLY_FETCH_LEGACY_ANOMALIES = 
"onlyFetchLegacyAnomalies";
+  static final String PROP_EMAIL_SUBJECT_TYPE = "emailSubjectStyle";
+  static final String PROP_DETECTION_CONFIG_IDS = "detectionConfigIds";
+  static final String PROP_ALERT_SCHEMES = "alertSchemes";
+  static final String PROP_ALERT_SUPPRESSORS = "alertSuppressors";
 
 Review comment:
   How to dynamically load the suppressors provided by third party?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to