Search in sources :

Example 1 with FileDistributionConfigProducer

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;
}
Also used : FileDistributionConfigProducer(com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer) Filedistributor(com.yahoo.container.QrConfig.Filedistributor)

Example 2 with FileDistributionConfigProducer

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());
}
Also used : FileDistributionConfigProducer(com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer) Metrics(com.yahoo.vespa.model.admin.monitoring.builder.Metrics) DefaultMonitoring(com.yahoo.vespa.model.admin.monitoring.DefaultMonitoring) Document(org.w3c.dom.Document) Admin(com.yahoo.vespa.model.admin.Admin) MockFileRegistry(com.yahoo.config.model.application.provider.MockFileRegistry) ConfigModelContext(com.yahoo.config.model.ConfigModelContext) ContentCluster(com.yahoo.vespa.model.content.cluster.ContentCluster)

Example 3 with FileDistributionConfigProducer

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;
}
Also used : FileDistributionConfigProducer(com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer) Metrics(com.yahoo.vespa.model.admin.monitoring.builder.Metrics) MetricsConsumer(com.yahoo.vespa.model.admin.monitoring.MetricsConsumer) DefaultMonitoring(com.yahoo.vespa.model.admin.monitoring.DefaultMonitoring) Monitoring(com.yahoo.vespa.model.admin.monitoring.Monitoring) MetricsBuilder(com.yahoo.vespa.model.admin.monitoring.builder.xml.MetricsBuilder)

Example 4 with FileDistributionConfigProducer

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);
    }
}
Also used : FileDistributionConfigProducer(com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer) FileDistributionConfigProvider(com.yahoo.vespa.model.filedistribution.FileDistributionConfigProvider)

Aggregations

FileDistributionConfigProducer (com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer)4 DefaultMonitoring (com.yahoo.vespa.model.admin.monitoring.DefaultMonitoring)2 Metrics (com.yahoo.vespa.model.admin.monitoring.builder.Metrics)2 ConfigModelContext (com.yahoo.config.model.ConfigModelContext)1 MockFileRegistry (com.yahoo.config.model.application.provider.MockFileRegistry)1 Filedistributor (com.yahoo.container.QrConfig.Filedistributor)1 Admin (com.yahoo.vespa.model.admin.Admin)1 MetricsConsumer (com.yahoo.vespa.model.admin.monitoring.MetricsConsumer)1 Monitoring (com.yahoo.vespa.model.admin.monitoring.Monitoring)1 MetricsBuilder (com.yahoo.vespa.model.admin.monitoring.builder.xml.MetricsBuilder)1 ContentCluster (com.yahoo.vespa.model.content.cluster.ContentCluster)1 FileDistributionConfigProvider (com.yahoo.vespa.model.filedistribution.FileDistributionConfigProvider)1 Document (org.w3c.dom.Document)1