mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 11:52:08 +08:00
增加线程池、客户端池可配置
This commit is contained in:
@@ -44,6 +44,9 @@ public class CollectAndPublishCGData extends AbstractScheduledTask<ClusterDO> {
|
||||
@Autowired
|
||||
private ConsumerService consumerService;
|
||||
|
||||
@Autowired
|
||||
private ThreadPool threadPool;
|
||||
|
||||
@Override
|
||||
protected List<ClusterDO> listAllTasks() {
|
||||
return clusterService.list();
|
||||
@@ -82,7 +85,7 @@ public class CollectAndPublishCGData extends AbstractScheduledTask<ClusterDO> {
|
||||
return getTopicConsumerMetrics(clusterDO, topicName, startTimeUnitMs);
|
||||
}
|
||||
});
|
||||
ThreadPool.submitCollectMetricsTask(taskList[i]);
|
||||
threadPool.submitCollectMetricsTask(clusterDO.getId(), taskList[i]);
|
||||
}
|
||||
|
||||
List<ConsumerMetrics> consumerMetricsList = new ArrayList<>();
|
||||
|
||||
@@ -32,6 +32,9 @@ public class FlushZKConsumerGroupMetadata {
|
||||
@Autowired
|
||||
private ClusterService clusterService;
|
||||
|
||||
@Autowired
|
||||
private ThreadPool threadPool;
|
||||
|
||||
@Scheduled(cron="35 0/1 * * * ?")
|
||||
public void schedule() {
|
||||
List<ClusterDO> doList = clusterService.list();
|
||||
@@ -95,7 +98,7 @@ public class FlushZKConsumerGroupMetadata {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
});
|
||||
ThreadPool.submitCollectMetricsTask(taskList[i]);
|
||||
threadPool.submitCollectMetricsTask(clusterId, taskList[i]);
|
||||
}
|
||||
|
||||
Map<String, Set<String>> topicNameConsumerGroupMap = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user