Search in sources :

Example 1 with FileDistributionConfigProvider

use of com.yahoo.vespa.model.filedistribution.FileDistributionConfigProvider in project vespa by vespa-engine.

the class Admin method addFileDistribution.

private void addFileDistribution(HostResource host) {
    FileDistributor fileDistributor = fileDistribution.getFileDistributor();
    HostResource deployHost = getHostSystem().getHostByHostname(fileDistributor.fileSourceHost());
    if (deployHostIsMissing(deployHost)) {
        throw new RuntimeException("Could not find host in the application's host system: '" + fileDistributor.fileSourceHost() + "'. Hostsystem=" + getHostSystem());
    }
    FileDistributionConfigProvider configProvider = new FileDistributionConfigProvider(fileDistribution, fileDistributor, host == deployHost, host.getHost());
    fileDistribution.addFileDistributionConfigProducer(host.getHost(), configProvider);
}
Also used : HostResource(com.yahoo.vespa.model.HostResource) FileDistributor(com.yahoo.vespa.model.filedistribution.FileDistributor) FileDistributionConfigProvider(com.yahoo.vespa.model.filedistribution.FileDistributionConfigProvider)

Example 2 with FileDistributionConfigProvider

use of com.yahoo.vespa.model.filedistribution.FileDistributionConfigProvider 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

FileDistributionConfigProvider (com.yahoo.vespa.model.filedistribution.FileDistributionConfigProvider)2 HostResource (com.yahoo.vespa.model.HostResource)1 FileDistributionConfigProducer (com.yahoo.vespa.model.filedistribution.FileDistributionConfigProducer)1 FileDistributor (com.yahoo.vespa.model.filedistribution.FileDistributor)1