use of com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerClusterVerifier in project vespa by vespa-engine.
the class DomAdminV2Builder method addConfiguredClusterControllers.
private ContainerCluster addConfiguredClusterControllers(AbstractConfigProducer parent, Element admin) {
Element controllersElements = XML.getChild(admin, "cluster-controllers");
if (controllersElements == null)
return null;
List<Element> controllers = XML.getChildren(controllersElements, "cluster-controller");
if (controllers.isEmpty())
return null;
boolean standaloneZooKeeper = "true".equals(controllersElements.getAttribute(ATTRIBUTE_CLUSTER_CONTROLLER_STANDALONE_ZK)) || multitenant;
if (standaloneZooKeeper) {
parent = new ClusterControllerCluster(parent, "standalone");
}
ContainerCluster cluster = new ContainerCluster(parent, "cluster-controllers", "cluster-controllers", new ClusterControllerClusterVerifier());
ContainerModelBuilder.addDefaultHandler_legacyBuilder(cluster);
List<Container> containers = new ArrayList<>();
for (Element controller : controllers) {
ClusterControllerContainer clusterController = new ClusterControllerBuilder(containers.size(), standaloneZooKeeper).build(cluster, controller);
containers.add(clusterController);
}
cluster.addContainers(containers);
return cluster;
}
Aggregations