This is an automated email from the ASF dual-hosted git repository.
akshayrai09 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 db7cd63 [TE] Update name for entity anomalies (#4370)
db7cd63 is described below
commit db7cd63fea89cf26349e5ba05f8813b16a1f19a7
Author: Akshay Rai <[email protected]>
AuthorDate: Wed Jun 26 17:17:59 2019 -0700
[TE] Update name for entity anomalies (#4370)
---
.../pinot/thirdeye/detection/wrapper/GrouperWrapper.java | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/GrouperWrapper.java
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/GrouperWrapper.java
index e23e37b..86134ab 100644
---
a/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/GrouperWrapper.java
+++
b/thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/wrapper/GrouperWrapper.java
@@ -47,15 +47,12 @@ public class GrouperWrapper extends DetectionPipeline {
private static final String PROP_NESTED = "nested";
private static final String PROP_CLASS_NAME = "className";
private static final String PROP_GROUPER = "grouper";
- private static final String PROP_DETECTOR = "detector";
private static final String PROP_DETECTOR_COMPONENT_NAME =
"detectorComponentName";
private final List<Map<String, Object>> nestedProperties;
private final Grouper grouper;
private final String grouperName;
- private final String detectorName;
- private final String entityName;
public GrouperWrapper(DataProvider provider, DetectionConfigDTO config, long
startTime, long endTime)
throws Exception {
@@ -68,9 +65,6 @@ public class GrouperWrapper extends DetectionPipeline {
this.grouperName =
DetectionUtils.getComponentKey(MapUtils.getString(config.getProperties(),
PROP_GROUPER));
Preconditions.checkArgument(this.config.getComponents().containsKey(this.grouperName));
this.grouper = (Grouper) this.config.getComponents().get(this.grouperName);
-
- this.entityName = MapUtils.getString(config.getProperties(),
PROP_DETECTOR);
- this.detectorName = DetectionUtils.getComponentKey(entityName);
}
/**
@@ -111,11 +105,11 @@ public class GrouperWrapper extends DetectionPipeline {
for (MergedAnomalyResultDTO anomaly : anomalies) {
if (anomaly.isChild()) {
throw new RuntimeException("Child anomalies returned by grouper. It
should always return parent anomalies"
- + " with child mapping. Detection id: " + this.config.getId() + ",
detector name: " + this.detectorName);
+ + " with child mapping. Detection id: " + this.config.getId() + ",
grouper name: " + this.grouperName);
}
anomaly.setDetectionConfigId(this.config.getId());
- anomaly.getProperties().put(PROP_DETECTOR_COMPONENT_NAME,
this.detectorName);
+ anomaly.getProperties().put(PROP_DETECTOR_COMPONENT_NAME,
this.grouperName);
}
return new DetectionPipelineResult(anomalies,
DetectionUtils.consolidateNestedLastTimeStamps(lastTimeStamps),
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]