use of com.yahoo.config.model.api.ServiceInfo in project vespa by vespa-engine.
the class SlobrokMonitor method getSlobrokSpecs.
List<String> getSlobrokSpecs(ApplicationInfo applicationInfo) {
List<String> slobrokSpecs = new ArrayList<>();
for (HostInfo host : applicationInfo.getModel().getHosts()) {
for (ServiceInfo service : host.getServices()) {
if (!Objects.equals(service.getServiceType(), SLOBROK_SERVICE_TYPE)) {
continue;
}
for (PortInfo port : service.getPorts()) {
if (port.getTags().contains(SLOBROK_RPC_PORT_TAG)) {
Spec spec = new Spec(host.getHostname(), port.getPort());
slobrokSpecs.add(spec.toString());
}
}
}
}
return slobrokSpecs;
}
Aggregations