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 ef42e58  [TE] Minor fix in legacy alert filter (#3576)
ef42e58 is described below

commit ef42e583545223165199c266003d2d65e09eba14
Author: Akshay Rai <[email protected]>
AuthorDate: Mon Dec 3 10:45:19 2018 -0800

    [TE] Minor fix in legacy alert filter (#3576)
---
 .../thirdeye/detection/alert/filter/LegacyAlertFilter.java        | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/filter/LegacyAlertFilter.java
 
b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/filter/LegacyAlertFilter.java
index 56a671f..886b7b7 100644
--- 
a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/filter/LegacyAlertFilter.java
+++ 
b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/filter/LegacyAlertFilter.java
@@ -72,8 +72,8 @@ public class LegacyAlertFilter extends DetectionAlertFilter {
     DetectionAlertFilterRecipients recipients = new 
DetectionAlertFilterRecipients(to, cc, bcc);
 
     Map<String, Object> alertFilterConfig = 
MapUtils.getMap(config.getProperties(), PROP_LEGACY_ALERT_FILTER_CONFIGS);
-    if (alertFilterConfig == null) {
-      LOG.info("alertFilterConfig cannot be found in notification group {}", 
this.config.getId());
+    if (alertFilterConfig == null || alertFilterConfig.size() == 0) {
+      LOG.warn("alertFilterConfig is null or empty in notification group {}", 
this.config.getId());
     }
 
     for (Long functionId : this.detectionConfigIds) {
@@ -94,9 +94,9 @@ public class LegacyAlertFilter extends DetectionAlertFilter {
       if 
(config.getProperties().containsKey(PROP_LEGACY_ALERT_FILTER_CLASS_NAME)) {
         String className = MapUtils.getString(config.getProperties(), 
PROP_LEGACY_ALERT_FILTER_CLASS_NAME);
         alertFilter = (BaseAlertFilter) Class.forName(className).newInstance();
-        Map<String, String> params = MapUtils.getMap(alertFilterConfig, 
functionId);
+        Map<String, String> params = MapUtils.getMap(alertFilterConfig, 
functionId.toString());
         if (params == null) {
-          LOG.info("AlertFilter cannot be found for function {} in 
notification group {}", functionId, this.config.getId());
+          LOG.warn("AlertFilter cannot be found for function {} in 
notification group {}", functionId, this.config.getId());
         }
 
         alertFilter.setParameters(params);


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

Reply via email to