|
|
@ -29,7 +29,6 @@ import org.apache.dolphinscheduler.alert.utils.PropertyUtils; |
|
|
|
import org.apache.dolphinscheduler.common.thread.Stopper; |
|
|
|
import org.apache.dolphinscheduler.common.thread.Stopper; |
|
|
|
import org.apache.dolphinscheduler.dao.AlertDao; |
|
|
|
import org.apache.dolphinscheduler.dao.AlertDao; |
|
|
|
import org.apache.dolphinscheduler.dao.DaoFactory; |
|
|
|
import org.apache.dolphinscheduler.dao.DaoFactory; |
|
|
|
import org.apache.dolphinscheduler.dao.PluginDao; |
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.dao.entity.Alert; |
|
|
|
import org.apache.dolphinscheduler.dao.entity.Alert; |
|
|
|
import org.apache.dolphinscheduler.remote.NettyRemotingServer; |
|
|
|
import org.apache.dolphinscheduler.remote.NettyRemotingServer; |
|
|
|
import org.apache.dolphinscheduler.remote.command.CommandType; |
|
|
|
import org.apache.dolphinscheduler.remote.command.CommandType; |
|
|
@ -53,8 +52,6 @@ public class AlertServer { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private AlertDao alertDao = DaoFactory.getDaoInstance(AlertDao.class); |
|
|
|
private AlertDao alertDao = DaoFactory.getDaoInstance(AlertDao.class); |
|
|
|
|
|
|
|
|
|
|
|
private PluginDao pluginDao = DaoFactory.getDaoInstance(PluginDao.class); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private AlertSender alertSender; |
|
|
|
private AlertSender alertSender; |
|
|
|
|
|
|
|
|
|
|
|
private static AlertServer instance; |
|
|
|
private static AlertServer instance; |
|
|
@ -114,7 +111,7 @@ public class AlertServer { |
|
|
|
NettyServerConfig serverConfig = new NettyServerConfig(); |
|
|
|
NettyServerConfig serverConfig = new NettyServerConfig(); |
|
|
|
serverConfig.setListenPort(ALERT_RPC_PORT); |
|
|
|
serverConfig.setListenPort(ALERT_RPC_PORT); |
|
|
|
this.server = new NettyRemotingServer(serverConfig); |
|
|
|
this.server = new NettyRemotingServer(serverConfig); |
|
|
|
this.server.registerProcessor(CommandType.ALERT_SEND_REQUEST, new AlertRequestProcessor(alertDao, alertPluginManager, pluginDao)); |
|
|
|
this.server.registerProcessor(CommandType.ALERT_SEND_REQUEST, new AlertRequestProcessor(alertDao, alertPluginManager)); |
|
|
|
this.server.start(); |
|
|
|
this.server.start(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|