vincentchenjl commented on a change in pull request #4724: [TE] Add event
trigger listener for event driven scheduling
URL: https://github.com/apache/incubator-pinot/pull/4724#discussion_r339207461
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/anomaly/detection/trigger/filter/ActiveDatasetFilter.java
##########
@@ -0,0 +1,13 @@
+package org.apache.pinot.thirdeye.anomaly.detection.trigger.filter;
+
+import org.apache.pinot.thirdeye.anomaly.detection.trigger.TriggerEvent;
+import
org.apache.pinot.thirdeye.anomaly.detection.trigger.utils.DatasetTriggerInfoRepo;
+
+public class ActiveDatasetFilter implements TriggerEventFilter{
+
+ @Override
+ public boolean isPassed(TriggerEvent e) {
+ DatasetTriggerInfoRepo triggerInfoRepo =
DatasetTriggerInfoRepo.getInstance();
+ return triggerInfoRepo.isDatasetActive(e.getDatasetName());
Review comment:
There might be a case that a event is associated with a dataset that does
not exist in our metadata. I would think it better to keep it.
----------------------------------------------------------------
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]