use of com.yahoo.config.model.api.ConfigServerSpec in project vespa by vespa-engine.
the class ZooKeepersConfigProvider method getZooKeepers.
// format for each element: hostname:port
public List<String> getZooKeepers() {
List<String> servers = new ArrayList<>();
for (Configserver server : configServers) {
ConfigServerSpec serverSpec = server.getConfigServerSpec();
servers.add(serverSpec.getHostName() + ":" + serverSpec.getZooKeeperPort());
}
return servers;
}
use of com.yahoo.config.model.api.ConfigServerSpec in project vespa by vespa-engine.
the class DomAdminBuilderBase method getConfigServersFromSpec.
List<Configserver> getConfigServersFromSpec(AbstractConfigProducer parent) {
List<Configserver> configservers = new ArrayList<>();
for (ConfigServerSpec spec : configServerSpecs) {
HostSystem hostSystem = parent.getHostSystem();
HostResource host = new HostResource(Host.createConfigServerHost(hostSystem, spec.getHostName()));
hostSystem.addBoundHost(host);
Configserver configserver = new Configserver(parent, spec.getHostName());
configserver.setHostResource(host);
configserver.setBasePort(configserver.getWantedPort());
configserver.initService();
configservers.add(configserver);
}
return configservers;
}
Aggregations