You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pinot.apache.org by GitBox <gi...@apache.org> on 2018/11/15 23:53:50 UTC

[GitHub] apucher commented on a change in pull request #3490: [TE] site wide impact filter - config global metric from yaml

apucher commented on a change in pull request #3490: [TE] site wide impact filter - config global metric from yaml 
URL: https://github.com/apache/incubator-pinot/pull/3490#discussion_r234050685
 
 

 ##########
 File path: thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/components/SitewideImpactRuleAnomalyFilter.java
 ##########
 @@ -56,9 +91,33 @@ public boolean isQualified(MergedAnomalyResultDTO anomaly) {
   @Override
   public void init(SitewideImpactRuleAnomalyFilterSpec spec, InputDataFetcher dataFetcher) {
     this.dataFetcher = dataFetcher;
-    this.baseline = BaselineParsingUtils.parseOffset(spec.getOffset(), spec.getTimezone());
     this.threshold = spec.getThreshold();
-    this.siteWideMetricUrn = spec.getSitewideMetricUrn();
+    this.pattern = Pattern.valueOf(spec.getPattern().toUpperCase());
+
+    // customize baseline offset
+    if (!Strings.isNullOrEmpty(spec.getOffset())){
+      this.baseline = BaselineParsingUtils.parseOffset(spec.getOffset(), spec.getTimezone());
+    }
+
+    if (!Strings.isNullOrEmpty(spec.getSitewideCollection()) && !Strings.isNullOrEmpty(spec.getSitewideMetricName())) {
 
 Review comment:
   nit: we generally use (apache) StringUtils.isNotBlank()

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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