use of com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer in project vespa by vespa-engine.
the class Container method filedistributorConfig.
private Filedistributor.Builder filedistributorConfig() {
Filedistributor.Builder builder = new Filedistributor.Builder();
FileDistributionConfigProducer fileDistribution = getRoot().getFileDistributionConfigProducer();
if (fileDistribution != null) {
builder.configid(fileDistribution.getConfigProducer(getHost()).getConfigId());
}
return builder;
}
use of com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer in project vespa by vespa-engine.
the class ContentClusterUtils method createCluster.
public static ContentCluster createCluster(String clusterXml, MockRoot root) {
Document doc = XML.getDocument(clusterXml);
Admin admin = new Admin(root, new DefaultMonitoring("vespa", 60), new Metrics(), Collections.emptyMap(), false, new FileDistributionConfigProducer(root, new MockFileRegistry(), null));
ConfigModelContext context = ConfigModelContext.create(null, root.getDeployState(), null, root, null);
return new ContentCluster.Builder(admin).build(Collections.emptyList(), context, doc.getDocumentElement());
}
use of com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer in project vespa by vespa-engine.
the class DomAdminBuilderBase method doBuild.
@Override
protected Admin doBuild(AbstractConfigProducer parent, Element adminElement) {
Monitoring monitoring = getMonitoring(getChildWithFallback(adminElement, "monitoring", "yamas"));
Metrics metrics = new MetricsBuilder(applicationType, predefinedMetricSets).buildMetrics(XML.getChild(adminElement, "metrics"));
Map<String, MetricsConsumer> legacyMetricsConsumers = DomMetricBuilderHelper.buildMetricsConsumers(XML.getChild(adminElement, "metric-consumers"));
FileDistributionConfigProducer fileDistributionConfigProducer = getFileDistributionConfigProducer(parent);
Admin admin = new Admin(parent, monitoring, metrics, legacyMetricsConsumers, multitenant, fileDistributionConfigProducer);
admin.setApplicationType(applicationType);
doBuildAdmin(admin, adminElement);
new ModelConfigProvider(admin);
return admin;
}
use of com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer in project vespa by vespa-engine.
the class SearchNode method getConfig.
@Override
public void getConfig(FiledistributorrpcConfig.Builder builder) {
FileDistributionConfigProducer fileDistribution = getRoot().getFileDistributionConfigProducer();
if (fileDistribution != null) {
FileDistributionConfigProvider configProducer = fileDistribution.getConfigProducer(getHost());
configProducer.getConfig(builder);
}
}
Aggregations