xiaohui-sun commented on a change in pull request #5165: [TE] Fix issue of
displaying latests data in the speed-up case
URL: https://github.com/apache/incubator-pinot/pull/5165#discussion_r396004703
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java
##########
@@ -290,6 +291,16 @@ long getLastTimeStamp() {
DateTime startTime = endTime.minus(windowSizePeriod);
monitoringWindows.add(new Interval(startTime, endTime));
}
+ if (isSpeedUp) {
Review comment:
I got your point. Then we can do a little trick - modify endTime after using
it.
How about the following? @vincentchenjl
List<Interval> monitoringWindows = new ArrayList<>();
List<DateTime> monitoringWindowEndTimes = getMonitoringWindowEndTimes();
DateTime detectionEndTime = new DateTime(endTime,
dateTimeZone).minus(windowDelayPeriod);
for (DateTime monitoringEndTime : monitoringWindowEndTimes) {
DateTime endTime = monitoringEndTime.minus(windowDelayPeriod);
DateTime startTime = endTime.minus(windowSizePeriod);
endTime = endTime.isAfter(detectionEndTime) ? detectionEndTime : endTime;
monitoringWindows.add(new Interval(startTime, endTime));
}
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]