diff options
author | Håkon Hallingstad <hakon@oath.com> | 2017-10-23 12:19:14 +0200 |
---|---|---|
committer | Håkon Hallingstad <hakon@oath.com> | 2017-10-23 12:19:14 +0200 |
commit | eee741266e6469cbdfa1ff551253764421d3b0a8 (patch) | |
tree | c503306aa6233a414360518f74b6ccff2276539f /orchestrator | |
parent | 59262d80a4c037acc5b944f30f09582797fad3d5 (diff) |
Make SlobrokMonitorManager a component
To get insights into the Slobrok data used by the service monitor, it would be
useful to expose SlobrokMonitorManager. For instance it could provide a list of
name/spec pairs of services that are up (added as ServiceMonitorManager::lookup
in this PR).
The first step towards this is making SlobrokMonitorManager a component.
Diffstat (limited to 'orchestrator')
-rw-r--r-- | orchestrator/src/main/java/com/yahoo/vespa/orchestrator/ServiceMonitorInstanceLookupService.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/ServiceMonitorInstanceLookupService.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/ServiceMonitorInstanceLookupService.java index 78271632989..a09ec29dada 100644 --- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/ServiceMonitorInstanceLookupService.java +++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/ServiceMonitorInstanceLookupService.java @@ -30,14 +30,14 @@ public class ServiceMonitorInstanceLookupService implements InstanceLookupServic @Override public Optional<ApplicationInstance> findInstanceById(ApplicationInstanceReference applicationInstanceReference) { Map<ApplicationInstanceReference, ApplicationInstance> instanceMap - = serviceMonitor.queryStatusOfAllApplicationInstances(); + = serviceMonitor.getAllApplicationInstances(); return Optional.ofNullable(instanceMap.get(applicationInstanceReference)); } @Override public Optional<ApplicationInstance> findInstanceByHost(HostName hostName) { Map<ApplicationInstanceReference, ApplicationInstance> instanceMap - = serviceMonitor.queryStatusOfAllApplicationInstances(); + = serviceMonitor.getAllApplicationInstances(); List<ApplicationInstance> applicationInstancesUsingHost = instanceMap.entrySet().stream() .filter(entry -> applicationInstanceUsesHost(entry.getValue(), hostName)) .map(Map.Entry::getValue) @@ -55,7 +55,7 @@ public class ServiceMonitorInstanceLookupService implements InstanceLookupServic @Override public Set<ApplicationInstanceReference> knownInstances() { - return serviceMonitor.queryStatusOfAllApplicationInstances().keySet(); + return serviceMonitor.getAllApplicationInstances().keySet(); } private static boolean applicationInstanceUsesHost(ApplicationInstance applicationInstance, |