felix-thinkingdata commented on a change in pull request #4616:
URL:
https://github.com/apache/incubator-dolphinscheduler/pull/4616#discussion_r567220414
##########
File path:
dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/runner/AlertSender.java
##########
@@ -157,7 +155,8 @@ private AlertResult alertResultHandler(AlertPluginInstance
instance, AlertData a
AlertInfo alertInfo = new AlertInfo();
alertInfo.setAlertData(alertData);
- alertInfo.setAlertParams(instance.getPluginInstanceParams());
+ Map<String, String> paramsMap =
JSONUtils.toMap(instance.getPluginInstanceParams());
+ alertInfo.setAlertParams(paramsMap);
AlertResult alertResult = alertChannel.process(alertInfo);
Review comment:
When a message needs to be sent by more than one alert instance, one of
the alert instances will throw an exception here, causing the other instance
alerts to be affected.
一个消息,需要多个告警实例发送时,其中一个告警实例此处抛出异常,会造成其他实例告警受影响。
This is also possible if the alert plug-in catches exceptions.
如果告警插件捕获异常也是可以的。
----------------------------------------------------------------
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]