the alert module support service.
This commit is contained in:
parent
2df6ecb2fc
commit
30d75f2185
|
|
@ -39,6 +39,10 @@
|
|||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-remote</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
package org.apache.dolphinscheduler.alert;
|
||||
|
||||
import static org.apache.dolphinscheduler.common.Constants.ALERT_RPC_PORT;
|
||||
|
||||
import org.apache.dolphinscheduler.alert.plugin.AlertPluginManager;
|
||||
import org.apache.dolphinscheduler.alert.plugin.DolphinPluginLoader;
|
||||
import org.apache.dolphinscheduler.alert.plugin.DolphinPluginManagerConfig;
|
||||
|
|
@ -110,7 +112,7 @@ public class AlertServer {
|
|||
*/
|
||||
private void initRemoteServer() {
|
||||
NettyServerConfig serverConfig = new NettyServerConfig();
|
||||
serverConfig.setListenPort(50501);
|
||||
serverConfig.setListenPort(ALERT_RPC_PORT);
|
||||
this.server = new NettyRemotingServer(serverConfig);
|
||||
this.server.registerProcessor(CommandType.ALERT_SEND_REQUEST, new AlertRequestProcessor(alertDao, alertPluginManager, pluginDao));
|
||||
this.server.start();
|
||||
|
|
|
|||
|
|
@ -387,13 +387,17 @@ public final class Constants {
|
|||
*/
|
||||
public static final int SEC_2_MINUTES_TIME_UNIT = 60;
|
||||
|
||||
|
||||
/***
|
||||
*
|
||||
* rpc port
|
||||
*/
|
||||
public static final int RPC_PORT = 50051;
|
||||
|
||||
/***
|
||||
* alert rpc port
|
||||
*/
|
||||
public static final int ALERT_RPC_PORT = 50052;
|
||||
|
||||
/**
|
||||
* forbid running task
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue