[ Status ] 完成Agent Metric部分

This commit is contained in:
zeaslity
2023-07-11 16:52:31 +08:00
parent 6a34bfd6d2
commit 98467f9590
6 changed files with 21 additions and 19 deletions

View File

@@ -141,7 +141,7 @@ public class CommonAndStatusCache {
// 检查,排除没有节点的情况
if (CollectionUtils.isEmpty(ALL_AGENT_TOPIC_NAME_LIST)) {
log.warn("[Serer Boot Up] Octopus Serer First Boot Up ! No Agent Registered Ever!");
log.warn("[Agent Status Cache] No Agent Registered Ever! Return");
return;
}
@@ -187,15 +187,13 @@ public class CommonAndStatusCache {
Collections.singletonList(timeString)
);
log.debug("Agent存活状态 状态-Agent名称-Map 已经更新了");
// 缓存相应的存活Agent
List<String> allHealthyAgentTopicNames = agentAliveStatusMap
.entrySet()
.stream()
.filter(
entry -> entry
.getKey()
.getValue()
.equals(Boolean.TRUE)
)
.map(
@@ -205,7 +203,12 @@ public class CommonAndStatusCache {
ALL_HEALTHY_AGENT_TOPIC_NAME_LIST.clear();
ALL_HEALTHY_AGENT_TOPIC_NAME_LIST.addAll(allHealthyAgentTopicNames);
log.debug(
"[状态二级缓存] - ALL_HEALTHY_AGENT_TOPIC_NAME_LIST 为=> {},\n STATUS_AGENT_LIST_MAP 为=> {},\n ALL_AGENT_STATUS_MAP 为=> {}\n",
ALL_HEALTHY_AGENT_TOPIC_NAME_LIST,
STATUS_AGENT_LIST_MAP,
ALL_AGENT_STATUS_MAP
);
// help gc
agentAliveStatusMap = null;