akshayrai commented on a change in pull request #4609: [TE][Composite-Alert]
Entity Anomaly Merger
URL: https://github.com/apache/incubator-pinot/pull/4609#discussion_r324308652
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/spi/model/AnomalySlice.java
##########
@@ -20,29 +20,36 @@
package org.apache.pinot.thirdeye.detection.spi.model;
import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.Collections2;
import com.google.common.collect.Multimap;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
import org.apache.pinot.thirdeye.datalayer.dto.MergedAnomalyResultDTO;
+import static org.apache.pinot.thirdeye.detection.wrapper.GrouperWrapper.*;
+
/**
* Selector for anomalies based on (optionally) detector id, start time, end
time, and
* dimension filters.
*/
public class AnomalySlice {
- final long start;
- final long end;
- final Multimap<String, String> filters;
+ private final long start;
+ private final long end;
+ private Multimap<String, String> filters;
+ private final List<String> detectionComponentNames;
+ private final boolean isTaggedAsChild;
public AnomalySlice() {
- this.start = -1;
- this.end = -1;
- this.filters = ArrayListMultimap.create();
+ this(-1, -1, ArrayListMultimap.create(), null, false);
}
- public AnomalySlice(long start, long end, Multimap<String, String> filters) {
+ public AnomalySlice(long start, long end, Multimap<String, String> filters,
List<String> detectionComponentName, boolean includeChildAnomalies) {
this.start = start;
this.end = end;
this.filters = filters;
+ this.detectionComponentNames = detectionComponentName;
+ this.isTaggedAsChild = includeChildAnomalies;
Review comment:
Ok, I can I need to clarify and correct the convention here.
I intend to use the `isTaggedAsChild` notation to filter and select
anomalies which are marked as child and not to mean filter and select their
child anomalies. I will fix the convention.
----------------------------------------------------------------
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]