Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[ISSUE #12282]Fix the issue where monitoring data cannot be found thr… #12315

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ private List<SampleResult> runConfigListenerCollectionJob(Map<String, String> pa
return new ClusterListenerJob(params, completionService, memberManager).runJobs();
}

private List<SampleResult> runConfigListenerByIpCollectionJob(Map<String, String> params,
CompletionService<SampleResult> completionService) {
return new ClusterListenerByIpJob(params, completionService, memberManager).runJobs();
}

static class ClusterListenerJob extends ClusterJob<SampleResult> {

static final String URL = Constants.COMMUNICATION_CONTROLLER_PATH + "/configWatchers";
Expand All @@ -93,6 +98,16 @@ static class ClusterListenerJob extends ClusterJob<SampleResult> {
}
}

static class ClusterListenerByIpJob extends ClusterJob<SampleResult> {

static final String URL = Constants.COMMUNICATION_CONTROLLER_PATH + "/watcherConfigs";

ClusterListenerByIpJob(Map<String, String> params, CompletionService<SampleResult> completionService,
ServerMemberManager serverMemberManager) {
super(URL, params, completionService, serverMemberManager);
}
}

private List<ListenerCheckResult> runHasCheckListenerCollectionJob(Map<String, String> params,
CompletionService<ListenerCheckResult> completionService) {
return new ClusterCheckHasListenerJob(params, completionService, memberManager).runJobs();
Expand Down Expand Up @@ -324,7 +339,7 @@ public SampleResult getCollectSampleResultByIp(String ip, int sampleTime) {

SampleResult sampleCollectResult = new SampleResult();
for (int i = 0; i < sampleTime; i++) {
List<SampleResult> sampleResults = runConfigListenerCollectionJob(params, completionService);
List<SampleResult> sampleResults = runConfigListenerByIpCollectionJob(params, completionService);
if (sampleResults != null) {
sampleCollectResult = mergeSampleResult(sampleCollectResult, sampleResults);
}
Expand Down
Loading