Search in sources :

Example 6 with Component

use of com.yahoo.vespa.model.container.component.Component in project vespa by vespa-engine.

the class DomComponentBuilder method doBuild.

protected Component doBuild(AbstractConfigProducer ancestor, Element spec) {
    Component component = buildComponent(spec);
    addChildren(ancestor, spec, component);
    return component;
}
Also used : Component(com.yahoo.vespa.model.container.component.Component)

Example 7 with Component

use of com.yahoo.vespa.model.container.component.Component in project vespa by vespa-engine.

the class DomFederationSearcherBuilder method doBuild.

protected FederationSearcher doBuild(AbstractConfigProducer ancestor, Element searcherElement) {
    FederationSearcherModel model = new FederationSearcherModelBuilder(searcherElement).build();
    Optional<Component> targetSelector = buildTargetSelector(ancestor, searcherElement, model.getComponentId());
    return new FederationSearcher(model, targetSelector);
}
Also used : FederationSearcher(com.yahoo.vespa.model.container.search.searchchain.FederationSearcher) Component(com.yahoo.vespa.model.container.component.Component) FederationSearcherModel(com.yahoo.search.searchchain.model.federation.FederationSearcherModel)

Example 8 with Component

use of com.yahoo.vespa.model.container.component.Component in project vespa by vespa-engine.

the class StandaloneDocprocContainerTest method requireNoMbusProvidersWhenStandalone.

@Test
public void requireNoMbusProvidersWhenStandalone() {
    ContainerCluster containerCluster = setupCluster(true);
    Map<ComponentId, Component<?, ?>> components = containerCluster.getComponentsMap();
    boolean foundAtLeastOneClient = false;
    boolean foundAtLeastOneServer = false;
    for (ComponentId componentId : components.keySet()) {
        if (componentId.stringValue().contains("MbusClient"))
            foundAtLeastOneClient = true;
        if (componentId.stringValue().contains("MbusServer"))
            foundAtLeastOneServer = true;
    }
    assertThat(foundAtLeastOneClient, is(false));
    assertThat(foundAtLeastOneServer, is(false));
}
Also used : ContainerCluster(com.yahoo.vespa.model.container.ContainerCluster) Component(com.yahoo.vespa.model.container.component.Component) ComponentId(com.yahoo.component.ComponentId) Test(org.junit.Test) DomBuilderTest(com.yahoo.config.model.builder.xml.test.DomBuilderTest)

Example 9 with Component

use of com.yahoo.vespa.model.container.component.Component in project vespa by vespa-engine.

the class StandaloneDocprocContainerTest method requireMbusProvidersWhenNonStandalone.

@Test
public void requireMbusProvidersWhenNonStandalone() {
    ContainerCluster containerCluster = setupCluster(false);
    Map<ComponentId, Component<?, ?>> components = containerCluster.getComponentsMap();
    boolean foundAtLeastOneClient = false;
    boolean foundAtLeastOneServer = false;
    for (ComponentId componentId : components.keySet()) {
        if (componentId.stringValue().contains("MbusClient"))
            foundAtLeastOneClient = true;
        if (componentId.stringValue().contains("MbusServer"))
            foundAtLeastOneServer = true;
    }
    assertThat(foundAtLeastOneClient, is(true));
    assertThat(foundAtLeastOneServer, is(true));
}
Also used : ContainerCluster(com.yahoo.vespa.model.container.ContainerCluster) Component(com.yahoo.vespa.model.container.component.Component) ComponentId(com.yahoo.component.ComponentId) Test(org.junit.Test) DomBuilderTest(com.yahoo.config.model.builder.xml.test.DomBuilderTest)

Aggregations

Component (com.yahoo.vespa.model.container.component.Component)9 Test (org.junit.Test)6 DomBuilderTest (com.yahoo.config.model.builder.xml.test.DomBuilderTest)5 ComponentId (com.yahoo.component.ComponentId)4 ContainerCluster (com.yahoo.vespa.model.container.ContainerCluster)4 VespaModel (com.yahoo.vespa.model.VespaModel)2 Element (org.w3c.dom.Element)2 AbstractConfigProducer (com.yahoo.config.model.producer.AbstractConfigProducer)1 ComponentsConfig (com.yahoo.container.ComponentsConfig)1 StatisticsConfig (com.yahoo.container.StatisticsConfig)1 JerseyInitConfig (com.yahoo.container.config.jersey.JerseyInitConfig)1 AccessLogConfig (com.yahoo.container.core.AccessLogConfig)1 JerseyBundlesConfig (com.yahoo.container.di.config.JerseyBundlesConfig)1 JerseyInjectionConfig (com.yahoo.container.di.config.JerseyInjectionConfig)1 JdiscBindingsConfig (com.yahoo.container.jdisc.JdiscBindingsConfig)1 HealthMonitorConfig (com.yahoo.container.jdisc.config.HealthMonitorConfig)1 ComponentModel (com.yahoo.osgi.provider.model.ComponentModel)1 FederationSearcherModel (com.yahoo.search.searchchain.model.federation.FederationSearcherModel)1 Handler (com.yahoo.vespa.model.container.component.Handler)1 StatisticsComponent (com.yahoo.vespa.model.container.component.StatisticsComponent)1