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 57368dd  [TE] backend - add an API to clear cache for 
DefaultDataProvider (#3936)
57368dd is described below

commit 57368dd4d5b2a5375d919fe73344278b2b68e052
Author: Xiaohui Sun <[email protected]>
AuthorDate: Fri Mar 8 09:30:38 2019 -0800

    [TE] backend - add an API to clear cache for DefaultDataProvider (#3936)
---
 .../org/apache/pinot/thirdeye/detection/DefaultDataProvider.java   | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/DefaultDataProvider.java
 
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/DefaultDataProvider.java
index 04d7ae9..a7e9026 100644
--- 
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/DefaultDataProvider.java
+++ 
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/DefaultDataProvider.java
@@ -313,4 +313,11 @@ public class DefaultDataProvider implements DataProvider {
     long diff = deadline - System.currentTimeMillis();
     return diff > 0 ? diff : 0;
   }
+
+  public static void cleanCache() {
+    if (DETECTION_TIME_SERIES_CACHE != null) {
+      DETECTION_TIME_SERIES_CACHE.cleanUp();
+      DETECTION_TIME_SERIES_CACHE = null;
+    }
+  }
 }


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

Reply via email to