增加对定时任务的说明

This commit is contained in:
xuguang
2022-01-21 10:50:29 +08:00
parent 373680d854
commit fdce41b451
15 changed files with 31 additions and 0 deletions

View File

@@ -156,6 +156,9 @@ public class LogicalClusterMetadataManager {
return logicalClusterDO.getClusterId(); return logicalClusterDO.getClusterId();
} }
/**
* 定时刷新逻辑集群元数据到缓存中
*/
@Scheduled(cron="0/30 * * * * ?") @Scheduled(cron="0/30 * * * * ?")
public void flush() { public void flush() {
List<LogicalClusterDO> logicalClusterDOList = logicalClusterService.listAll(); List<LogicalClusterDO> logicalClusterDOList = logicalClusterService.listAll();

View File

@@ -275,6 +275,9 @@ public class AccountServiceImpl implements AccountService {
return enterpriseStaffService.searchEnterpriseStaffByKeyWord(prefix); return enterpriseStaffService.searchEnterpriseStaffByKeyWord(prefix);
} }
/**
* 定时刷新account信息到缓存中
*/
@Scheduled(cron ="0/5 * * * * ?") @Scheduled(cron ="0/5 * * * * ?")
public void flush() { public void flush() {
try { try {

View File

@@ -23,6 +23,9 @@ public class Heartbeat {
@Autowired @Autowired
private HeartbeatDao heartbeatDao; private HeartbeatDao heartbeatDao;
/**
* 定时获取管控平台所在机器IP等信息到DB
*/
@Scheduled(cron = ScheduledTaskConstant.HEARTBEAT_CRON) @Scheduled(cron = ScheduledTaskConstant.HEARTBEAT_CRON)
public void ipFlush() { public void ipFlush() {
try { try {

View File

@@ -17,6 +17,7 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
/** /**
* 同步更新集群任务状态
* @author zengqiao * @author zengqiao
* @date 20/9/7 * @date 20/9/7
*/ */

View File

@@ -28,6 +28,7 @@ import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask; import java.util.concurrent.FutureTask;
/** /**
* 收集并发布消费者指标数据
* @author zengqiao * @author zengqiao
* @date 20/9/14 * @date 20/9/14
*/ */

View File

@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import java.util.*; import java.util.*;
/** /**
* 收集和发布Topic限流信息
* @author zengqiao * @author zengqiao
* @date 2019-05-10 * @date 2019-05-10
*/ */

View File

@@ -21,6 +21,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import java.util.*; import java.util.*;
/** /**
* JMX中获取appId维度的流量信息存DB
* @author zengqiao * @author zengqiao
* @date 20/7/21 * @date 20/7/21
*/ */

View File

@@ -21,6 +21,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import java.util.*; import java.util.*;
/** /**
* JMX中获取的TopicRequestTimeMetrics信息存DB
* @author zengqiao * @author zengqiao
* @date 20/7/21 * @date 20/7/21
*/ */

View File

@@ -31,6 +31,7 @@ import java.util.List;
import java.util.Properties; import java.util.Properties;
/** /**
* 定时自动处理Topic相关工单
* @author zengqiao * @author zengqiao
* @date 20/7/28 * @date 20/7/28
*/ */

View File

@@ -26,6 +26,7 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
/** /**
* 定时上报Topic监控指标
* @author zengqiao * @author zengqiao
* @date 20/8/10 * @date 20/8/10
*/ */

View File

@@ -30,6 +30,9 @@ public class FlushTopicMetrics {
@Autowired @Autowired
private ClusterService clusterService; private ClusterService clusterService;
/**
* 定时刷新topic指标到缓存中
*/
@Scheduled(cron="5 0/1 * * * ?") @Scheduled(cron="5 0/1 * * * ?")
public void flushTopicMetrics() { public void flushTopicMetrics() {
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();

View File

@@ -30,6 +30,9 @@ public class FlushBKConsumerGroupMetadata {
@Autowired @Autowired
private ClusterService clusterService; private ClusterService clusterService;
/**
* 定时刷新broker上消费组信息到缓存中
*/
@Scheduled(cron="15 0/1 * * * ?") @Scheduled(cron="15 0/1 * * * ?")
public void schedule() { public void schedule() {
List<ClusterDO> doList = clusterService.list(); List<ClusterDO> doList = clusterService.list();

View File

@@ -25,6 +25,9 @@ public class FlushClusterMetadata {
@Autowired @Autowired
private PhysicalClusterMetadataManager physicalClusterMetadataManager; private PhysicalClusterMetadataManager physicalClusterMetadataManager;
/**
* 定时刷新物理集群元信息到缓存中
*/
@Scheduled(cron="0/30 * * * * ?") @Scheduled(cron="0/30 * * * * ?")
public void flush() { public void flush() {
Map<Long, ClusterDO> dbClusterMap = clusterService.list().stream().collect(Collectors.toMap(ClusterDO::getId, Function.identity(), (key1, key2) -> key2)); Map<Long, ClusterDO> dbClusterMap = clusterService.list().stream().collect(Collectors.toMap(ClusterDO::getId, Function.identity(), (key1, key2) -> key2));

View File

@@ -27,6 +27,9 @@ public class FlushTopicProperties {
@Autowired @Autowired
private ClusterService clusterService; private ClusterService clusterService;
/**
* 定时刷新物理集群配置到缓存中
*/
@Scheduled(cron="25 0/1 * * * ?") @Scheduled(cron="25 0/1 * * * ?")
public void flush() { public void flush() {
List<ClusterDO> doList = clusterService.list(); List<ClusterDO> doList = clusterService.list();

View File

@@ -35,6 +35,9 @@ public class FlushZKConsumerGroupMetadata {
@Autowired @Autowired
private ThreadPool threadPool; private ThreadPool threadPool;
/**
* 定时刷新zk上的消费组信息到缓存中
*/
@Scheduled(cron="35 0/1 * * * ?") @Scheduled(cron="35 0/1 * * * ?")
public void schedule() { public void schedule() {
List<ClusterDO> doList = clusterService.list(); List<ClusterDO> doList = clusterService.list();