Browse Source

change variable name ,make it easy to understand (#2647)

Co-authored-by: dailidong <dailidong66@gmail.com>
pull/2/head
gabry.wu 5 years ago committed by GitHub
parent
commit
1771aa50d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/plugin/EmailAlertPlugin.java
  2. 2
      dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/runner/AlertSender.java
  3. 2
      dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/utils/Constants.java
  4. 2
      dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/plugin/EmailAlertPluginTest.java
  5. 4
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/plugin/FilePluginManager.java

2
dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/plugin/EmailAlertPlugin.java

@ -56,7 +56,7 @@ public class EmailAlertPlugin implements AlertPlugin {
@Override
public String getId() {
return Constants.PLUGIN_DEFAULT_EMAIL;
return Constants.PLUGIN_DEFAULT_EMAIL_ID;
}
@Override

2
dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/runner/AlertSender.java

@ -80,7 +80,7 @@ public class AlertSender {
alertInfo.addProp("receivers", receviersList);
AlertPlugin emailPlugin = pluginManager.findOne(Constants.PLUGIN_DEFAULT_EMAIL);
AlertPlugin emailPlugin = pluginManager.findOne(Constants.PLUGIN_DEFAULT_EMAIL_ID);
retMaps = emailPlugin.process(alertInfo);
if (retMaps == null) {

2
dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/utils/Constants.java

@ -179,7 +179,7 @@ public class Constants {
*/
public static final String PLUGIN_DIR = "plugin.dir";
public static final String PLUGIN_DEFAULT_EMAIL = "email";
public static final String PLUGIN_DEFAULT_EMAIL_ID = "email";
public static final String PLUGIN_DEFAULT_EMAIL_CH = "邮件";

2
dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/plugin/EmailAlertPluginTest.java

@ -47,7 +47,7 @@ public class EmailAlertPluginTest {
@Test
public void getId() {
String id = plugin.getId();
assertEquals(Constants.PLUGIN_DEFAULT_EMAIL, id);
assertEquals(Constants.PLUGIN_DEFAULT_EMAIL_ID, id);
}
@Test

4
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/plugin/FilePluginManager.java

@ -90,8 +90,8 @@ public class FilePluginManager implements PluginManager {
}
@Override
public AlertPlugin findOne(String name) {
return pluginMap.get(name);
public AlertPlugin findOne(String pluginId) {
return pluginMap.get(pluginId);
}
@Override

Loading…
Cancel
Save