You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/05/08 17:14:49 UTC

[GitHub] [incubator-pinot] xiaohui-sun commented on a change in pull request #4190: [TE] pass predicted time series thought out the detection pipeline

xiaohui-sun commented on a change in pull request #4190: [TE] pass predicted time series thought out the detection pipeline
URL: https://github.com/apache/incubator-pinot/pull/4190#discussion_r282152183
 
 

 ##########
 File path: thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/DetectionPipelineResult.java
 ##########
 @@ -29,38 +30,46 @@
   public static String DIAGNOSTICS_DATA = "data";
   public static String DIAGNOSTICS_CHANGE_POINTS = "changepoints";
 
-  Map<String, Object> diagnostics;
-  List<MergedAnomalyResultDTO> anomalies;
-  long lastTimestamp;
+  private Map<String, Object> diagnostics;
+  private final List<MergedAnomalyResultDTO> anomalies;
+  private final long lastTimestamp;
+  private final List<PredictionResult> predictions;
 
   public DetectionPipelineResult(List<MergedAnomalyResultDTO> anomalies) {
     this.anomalies = anomalies;
     this.lastTimestamp = getMaxTime(anomalies);
     this.diagnostics = new HashMap<>();
+    this.predictions = Collections.emptyList();
   }
 
   public DetectionPipelineResult(List<MergedAnomalyResultDTO> anomalies, long lastTimestamp) {
     this.anomalies = anomalies;
     this.lastTimestamp = lastTimestamp;
+    this.predictions = Collections.emptyList();
+    this.diagnostics = new HashMap<>();
+  }
+
+  public DetectionPipelineResult(List<MergedAnomalyResultDTO> anomalies, long lastTimestamp,
+      List<PredictionResult> predictedTimeSeries) {
+    this.anomalies = anomalies;
 
 Review comment:
   ditto

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


With regards,
Apache Git Services

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