jihaozh commented on a change in pull request #4072: [TE] detection - handle
day light savings time in moving windows
URL: https://github.com/apache/incubator-pinot/pull/4072#discussion_r272288686
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/DetectionUtils.java
##########
@@ -219,4 +221,20 @@ public static Period
getMonitoringGranularityPeriod(String monitoringGranularity
return TimeGranularity.fromString(monitoringGranularity).toPeriod();
}
+ public static Period periodFromTimeUnit(int size, TimeUnit unit) {
+ switch (unit) {
+ case DAYS:
+ return Period.days(size);
+ case HOURS:
+ return Period.hours(size);
+ case MILLISECONDS:
Review comment:
Sure.
----------------------------------------------------------------
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]