提交 2a0dab14 编写于 作者: T Tboy 提交者: qiaozhanwei

we should insert alert DB once , and trigger this type of alert 3 times (#1622)

上级 e9fcf612
......@@ -152,11 +152,9 @@ public class MasterServer implements IStoppable {
@Override
public void run() {
if (zkMasterClient.getActiveMasterNum() <= 1) {
for (int i = 0; i < Constants.DOLPHINSCHEDULER_WARN_TIMES_FAILOVER; i++) {
zkMasterClient.getAlertDao().sendServerStopedAlert(
1, OSUtils.getHost(), "Master-Server");
}
}
stop("shutdownhook");
}
}));
......
......@@ -177,10 +177,8 @@ public class WorkerServer implements IStoppable {
public void run() {
// worker server exit alert
if (zkWorkerClient.getActiveMasterNum() <= 1) {
for (int i = 0; i < Constants.DOLPHINSCHEDULER_WARN_TIMES_FAILOVER; i++) {
alertDao.sendServerStopedAlert(1, OSUtils.getHost(), "Worker-Server");
}
}
stop("shutdownhook");
}
}));
......
......@@ -248,10 +248,8 @@ public class ZKMasterClient extends AbstractZKClient {
private void alertServerDown(String serverHost, ZKNodeType zkNodeType) {
String serverType = zkNodeType.toString();
for (int i = 0; i < Constants.DOLPHINSCHEDULER_WARN_TIMES_FAILOVER; i++) {
alertDao.sendServerStopedAlert(1, serverHost, serverType);
}
}
/**
* monitor master
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册