Skip to content

Commit 7d045db

Browse files
zengqiaoZQKC
authored andcommitted
补充ZK健康巡检任务
1 parent 4ff4acc commit 7d045db

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.xiaojukeji.know.streaming.km.task.health;
2+
3+
import com.didiglobal.logi.job.annotation.Task;
4+
import com.didiglobal.logi.job.core.consensual.ConsensualEnum;
5+
import com.xiaojukeji.know.streaming.km.core.service.health.checker.AbstractHealthCheckService;
6+
import com.xiaojukeji.know.streaming.km.core.service.health.checker.zookeeper.HealthCheckZookeeperService;
7+
import lombok.AllArgsConstructor;
8+
import lombok.NoArgsConstructor;
9+
import org.springframework.beans.factory.annotation.Autowired;
10+
11+
12+
@NoArgsConstructor
13+
@AllArgsConstructor
14+
@Task(name = "ZookeeperHealthCheckTask",
15+
description = "Zookeeper健康检查",
16+
cron = "0 0/1 * * * ? *",
17+
autoRegister = true,
18+
consensual = ConsensualEnum.BROADCAST,
19+
timeout = 2 * 60)
20+
public class ZookeeperHealthCheckTask extends AbstractHealthCheckTask {
21+
@Autowired
22+
private HealthCheckZookeeperService healthCheckZookeeperService;
23+
24+
@Override
25+
public AbstractHealthCheckService getCheckService() {
26+
return healthCheckZookeeperService;
27+
}
28+
}

0 commit comments

Comments
 (0)