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 2019/07/22 17:41:54 UTC

[incubator-pinot] branch master updated: [TE] Bug Fix - Parsing of multiple alert schemes (#4456)

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 25e7be1  [TE] Bug Fix - Parsing of multiple alert schemes (#4456)
25e7be1 is described below

commit 25e7be1ca66b7ca917fca4f5f643db1d683cabf4
Author: Akshay Rai <ak...@gmail.com>
AuthorDate: Mon Jul 22 10:41:49 2019 -0700

    [TE] Bug Fix - Parsing of multiple alert schemes (#4456)
---
 .../detection/yaml/translator/SubscriptionConfigTranslator.java        | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/SubscriptionConfigTranslator.java b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/SubscriptionConfigTranslator.java
index 9f0bd62..a422bc1 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/SubscriptionConfigTranslator.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/translator/SubscriptionConfigTranslator.java
@@ -136,9 +136,10 @@ public class SubscriptionConfigTranslator extends ConfigTranslator<DetectionAler
   private Map<String,Map<String,Object>>  buildAlertSchemes(Map<String,Object> yamlAlertConfig) {
     List<Map<String, Object>> alertSchemes = ConfigUtils.getList(yamlAlertConfig.get(PROP_ALERT_SCHEMES));
     Map<String, Map<String, Object>> alertSchemesHolder = new HashMap<>();
-    Map<String, Object> alertSchemesParsed = new HashMap<>();
     if (!alertSchemes.isEmpty()) {
       for (Map<String, Object> alertScheme : alertSchemes) {
+        Map<String, Object> alertSchemesParsed = new HashMap<>();
+
         Preconditions.checkNotNull(alertScheme.get(PROP_TYPE));
         alertSchemesParsed.put(PROP_CLASS_NAME,
               DETECTION_ALERT_REGISTRY.lookupAlertSchemes(alertScheme.get(PROP_TYPE).toString()));


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