jihaozh commented on a change in pull request #4322: [TE]  detection health 
status
URL: https://github.com/apache/incubator-pinot/pull/4322#discussion_r294971103
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/DetectionHealth.java
 ##########
 @@ -0,0 +1,379 @@
+package org.apache.pinot.thirdeye.detection;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableSet;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.pinot.thirdeye.anomaly.task.TaskConstants;
+import org.apache.pinot.thirdeye.datalayer.bao.EvaluationManager;
+import org.apache.pinot.thirdeye.datalayer.bao.MergedAnomalyResultManager;
+import org.apache.pinot.thirdeye.datalayer.bao.TaskManager;
+import org.apache.pinot.thirdeye.datalayer.dto.EvaluationDTO;
+import org.apache.pinot.thirdeye.datalayer.dto.MergedAnomalyResultDTO;
+import org.apache.pinot.thirdeye.datalayer.dto.TaskDTO;
+import org.apache.pinot.thirdeye.datalayer.pojo.EvaluationBean;
+import org.apache.pinot.thirdeye.datalayer.pojo.MergedAnomalyResultBean;
+import org.apache.pinot.thirdeye.datalayer.pojo.TaskBean;
+import org.apache.pinot.thirdeye.datalayer.util.Predicate;
+import org.joda.time.Interval;
+
+
+/**
+ * The detection health metric and status
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class DetectionHealth {
+  // overall health for a detection config
+  @JsonProperty
+  private HealthStatus overallHealth;
+
+  // the regression metrics and status for a detection config
+  @JsonProperty
+  private RegressionStatus regressionStatus;
+
+  // the anomaly coverage status for a detection config
+  @JsonProperty
+  private AnomalyCoverageStatus anomalyCoverageStatus;
+
+  // the detection task status for a detection config
+  @JsonProperty
+  private DetectionTaskStatus detectionTaskStatus;
+
+  public enum HealthStatus {
+    GOOD, MODERATE, BAD
+  }
+
+  public static class RegressionStatus {
 
 Review comment:
   Moved the classes

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


With regards,
Apache Git Services

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

Reply via email to