akshayrai commented on a change in pull request #4900: [TE][detection] 
Implement anomalies cache to speed up detection
URL: https://github.com/apache/incubator-pinot/pull/4900#discussion_r359159552
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/cache/builder/AnomaliesCacheBuilder.java
 ##########
 @@ -0,0 +1,147 @@
+package org.apache.pinot.thirdeye.detection.cache.builder;
+
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import com.google.common.collect.Lists;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import org.apache.pinot.thirdeye.datalayer.bao.MergedAnomalyResultManager;
+import org.apache.pinot.thirdeye.datalayer.dto.MergedAnomalyResultDTO;
+import org.apache.pinot.thirdeye.datalayer.util.Predicate;
+import org.apache.pinot.thirdeye.datasource.DAORegistry;
+import org.apache.pinot.thirdeye.detection.DetectionUtils;
+import org.apache.pinot.thirdeye.detection.cache.CacheConfig;
+import org.apache.pinot.thirdeye.detection.spi.model.AnomalySlice;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ *  Essentially a fetcher for fetching anomalies from cache/datasource.
+ *  The cache holds anomalies information per Anomaly Slices
+ */
+public class AnomaliesCacheBuilder {
 
 Review comment:
   Sharing some details:
   
   **Execution Time (Entity Alert):**
   
   | Dimension Exploration (Top k) | Without Anomalies Cache | With Anomalies 
Cache |
   | -- | -- |  -- |
   |100 | 20 mins | 7.5 mins | 
   |1000 | 6 hours | 1 hour | 
   
   

----------------------------------------------------------------
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]

Reply via email to