This is an automated email from the ASF dual-hosted git repository.

xhsun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new c8d2f7f  Fix minute speedup (#4060)
c8d2f7f is described below

commit c8d2f7f6cb923492ca7e7a6b33b8dd0e628addde
Author: Xiaohui Sun <[email protected]>
AuthorDate: Wed Apr 3 09:28:22 2019 -0700

    Fix minute speedup (#4060)
    
    * [TE] fix bucketPeriod comparison logic for minute speedup
    
    * [TE] fix bucketPeriod comparison logic for minute speedup
---
 .../pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java
 
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java
index 27a5a6f..b549427 100644
--- 
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java
+++ 
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/AnomalyDetectorWrapper.java
@@ -363,7 +363,8 @@ public class AnomalyDetectorWrapper extends 
DetectionPipeline {
    * It is possible to have bucketPeriod as 5 minutes but windowSize is 6 
hours.
    */
   private void speedUpMinuteLevelDetection() {
-    if (bucketPeriod.getMinutes() <= 15 && endTime - startTime >= 
Period.days(1).getMillis()) {
+    if (bucketPeriod.toStandardDuration().getMillis() <= 
Period.minutes(15).toStandardDuration().getMillis()
+        && endTime - startTime >= 
Period.days(1).toStandardDuration().getMillis()) {
       bucketPeriod = Period.days(1);
       windowSize = 1;
       windowUnit = TimeUnit.DAYS;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to