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/01/23 23:14:45 UTC
[incubator-pinot] branch master updated: [TE] detection - Support
enable/disable detection/alert in Yaml (#3736)
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 f22d272 [TE] detection - Support enable/disable detection/alert in Yaml (#3736)
f22d272 is described below
commit f22d27220f6fd1ea34e23bd4f1c0ff9728432085
Author: Jihao Zhang <ji...@linkedin.com>
AuthorDate: Wed Jan 23 15:14:40 2019 -0800
[TE] detection - Support enable/disable detection/alert in Yaml (#3736)
---
.../pinot/thirdeye/detection/yaml/YamlDetectionConfigTranslator.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlDetectionConfigTranslator.java b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlDetectionConfigTranslator.java
index eaea987..816aebd 100644
--- a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlDetectionConfigTranslator.java
+++ b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/yaml/YamlDetectionConfigTranslator.java
@@ -38,7 +38,7 @@ import org.yaml.snakeyaml.Yaml;
public abstract class YamlDetectionConfigTranslator {
protected static final Logger LOG = LoggerFactory.getLogger(YamlDetectionConfigTranslator.class);
private static final String PROP_NAME = "detectionName";
-
+ private static final String PROP_ACTIVE = "active";
protected Map<String, Object> yamlConfig;
protected long startTime;
@@ -86,6 +86,7 @@ public abstract class YamlDetectionConfigTranslator {
config.setProperties(translationResult.getProperties());
config.setComponentSpecs(translationResult.getComponents());
config.setCron(translationResult.getCron());
+ config.setActive(MapUtils.getBooleanValue(yamlConfig, PROP_ACTIVE, true));
DumperOptions options = new DumperOptions();
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org