use of com.yahoo.vespa.hosted.node.admin.configserver.noderepository.bindings.GetNodesResponse in project vespa by vespa-engine.
the class RealNodeRepository method getContainersToRun.
@Override
public List<ContainerNodeSpec> getContainersToRun(String baseHostName) {
final GetNodesResponse nodesForHost = configServerApi.get("/nodes/v2/node/?parentHost=" + baseHostName + "&recursive=true", GetNodesResponse.class);
List<ContainerNodeSpec> nodes = new ArrayList<>(nodesForHost.nodes.size());
for (GetNodesResponse.Node node : nodesForHost.nodes) {
ContainerNodeSpec nodeSpec;
try {
nodeSpec = createContainerNodeSpec(node);
} catch (IllegalArgumentException | NullPointerException e) {
NODE_ADMIN_LOGGER.warning("Bad node received from node repo when requesting children of the " + baseHostName + " host: " + node, e);
continue;
}
nodes.add(nodeSpec);
}
return nodes;
}
Aggregations