akshayrai closed pull request #3576: [TE] Minor fix in legacy alert filter
URL: https://github.com/apache/incubator-pinot/pull/3576
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/filter/LegacyAlertFilter.java
b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/filter/LegacyAlertFilter.java
index 56a671f5ac..886b7b7137 100644
---
a/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/filter/LegacyAlertFilter.java
+++
b/thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/detection/alert/filter/LegacyAlertFilter.java
@@ -72,8 +72,8 @@ public DetectionAlertFilterResult run() throws Exception {
DetectionAlertFilterRecipients recipients = new
DetectionAlertFilterRecipients(to, cc, bcc);
Map<String, Object> alertFilterConfig =
MapUtils.getMap(config.getProperties(), PROP_LEGACY_ALERT_FILTER_CONFIGS);
- if (alertFilterConfig == null) {
- LOG.info("alertFilterConfig cannot be found in notification group {}",
this.config.getId());
+ if (alertFilterConfig == null || alertFilterConfig.size() == 0) {
+ LOG.warn("alertFilterConfig is null or empty in notification group {}",
this.config.getId());
}
for (Long functionId : this.detectionConfigIds) {
@@ -94,9 +94,9 @@ public DetectionAlertFilterResult run() throws Exception {
if
(config.getProperties().containsKey(PROP_LEGACY_ALERT_FILTER_CLASS_NAME)) {
String className = MapUtils.getString(config.getProperties(),
PROP_LEGACY_ALERT_FILTER_CLASS_NAME);
alertFilter = (BaseAlertFilter) Class.forName(className).newInstance();
- Map<String, String> params = MapUtils.getMap(alertFilterConfig,
functionId);
+ Map<String, String> params = MapUtils.getMap(alertFilterConfig,
functionId.toString());
if (params == null) {
- LOG.info("AlertFilter cannot be found for function {} in
notification group {}", functionId, this.config.getId());
+ LOG.warn("AlertFilter cannot be found for function {} in
notification group {}", functionId, this.config.getId());
}
alertFilter.setParameters(params);
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]