Search in sources :

Example 1 with QrStartConfig

use of com.yahoo.search.config.QrStartConfig in project vespa by vespa-engine.

the class DocprocBuilderTest method setupCluster.

@Before
public void setupCluster() {
    ContainerModel model = new ContainerModelBuilder(false, Networking.disable).build(DeployState.createTestState(), null, root, servicesXml());
    cluster = model.getCluster();
    cluster.getDocproc().getChains().addServersAndClientsForChains();
    root.freezeModelTopology();
    containerMbusConfig = root.getConfig(ContainerMbusConfig.class, cluster.getContainers().get(0).getConfigId());
    componentsConfig = root.getConfig(ComponentsConfig.class, cluster.getConfigId());
    chainsConfig = root.getConfig(ChainsConfig.class, cluster.getConfigId() + "/component/com.yahoo.docproc.jdisc.DocumentProcessingHandler");
    documentmanagerConfig = root.getConfig(DocumentmanagerConfig.class, cluster.getConfigId());
    bundlesConfig = root.getConfig(BundlesConfig.class, cluster.getConfigId());
    schemamappingConfig = root.getConfig(SchemamappingConfig.class, cluster.getContainers().get(0).getConfigId());
    qrStartConfig = root.getConfig(QrStartConfig.class, cluster.getConfigId());
    docprocConfig = root.getConfig(DocprocConfig.class, cluster.getConfigId());
}
Also used : ComponentsConfig(com.yahoo.container.ComponentsConfig) BundlesConfig(com.yahoo.container.BundlesConfig) DocprocConfig(com.yahoo.config.docproc.DocprocConfig) SchemamappingConfig(com.yahoo.config.docproc.SchemamappingConfig) DocumentmanagerConfig(com.yahoo.document.config.DocumentmanagerConfig) ChainsConfig(com.yahoo.container.core.ChainsConfig) QrStartConfig(com.yahoo.search.config.QrStartConfig) ContainerMbusConfig(com.yahoo.container.jdisc.ContainerMbusConfig) ContainerModel(com.yahoo.vespa.model.container.ContainerModel) Before(org.junit.Before)

Example 2 with QrStartConfig

use of com.yahoo.search.config.QrStartConfig in project vespa by vespa-engine.

the class ContainerClusterTest method verifyHeapSizeAsPercentageOfPhysicalMemory.

private void verifyHeapSizeAsPercentageOfPhysicalMemory(boolean isHosted, boolean isCombinedCluster, Optional<Integer> explicitMemoryPercentage, int expectedMemoryPercentage) {
    ContainerCluster cluster = createContainerCluster(isHosted, isCombinedCluster, explicitMemoryPercentage);
    QrStartConfig.Builder qsB = new QrStartConfig.Builder();
    cluster.getSearch().getConfig(qsB);
    QrStartConfig qsC = new QrStartConfig(qsB);
    assertEquals(expectedMemoryPercentage, qsC.jvm().heapSizeAsPercentageOfPhysicalMemory());
}
Also used : QrStartConfig(com.yahoo.search.config.QrStartConfig)

Example 3 with QrStartConfig

use of com.yahoo.search.config.QrStartConfig in project vespa by vespa-engine.

the class ContainerClusterTest method testClusterControllerResourceUsage.

@Test
public void testClusterControllerResourceUsage() {
    ContainerCluster cluster = createClusterControllerCluster();
    addClusterController(cluster, "host-c1");
    assertEquals(1, cluster.getContainers().size());
    ClusterControllerContainer container = (ClusterControllerContainer) cluster.getContainers().get(0);
    QrStartConfig.Builder qrBuilder = new QrStartConfig.Builder();
    container.getConfig(qrBuilder);
    QrStartConfig qrStartConfig = new QrStartConfig(qrBuilder);
    assertEquals(512, qrStartConfig.jvm().heapsize());
    ThreadpoolConfig.Builder tpBuilder = new ThreadpoolConfig.Builder();
    cluster.getConfig(tpBuilder);
    ThreadpoolConfig threadpoolConfig = new ThreadpoolConfig(tpBuilder);
    assertEquals(10, threadpoolConfig.maxthreads());
}
Also used : ClusterControllerContainer(com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerContainer) ThreadpoolConfig(com.yahoo.container.handler.ThreadpoolConfig) QrStartConfig(com.yahoo.search.config.QrStartConfig) Test(org.junit.Test)

Aggregations

QrStartConfig (com.yahoo.search.config.QrStartConfig)3 DocprocConfig (com.yahoo.config.docproc.DocprocConfig)1 SchemamappingConfig (com.yahoo.config.docproc.SchemamappingConfig)1 BundlesConfig (com.yahoo.container.BundlesConfig)1 ComponentsConfig (com.yahoo.container.ComponentsConfig)1 ChainsConfig (com.yahoo.container.core.ChainsConfig)1 ThreadpoolConfig (com.yahoo.container.handler.ThreadpoolConfig)1 ContainerMbusConfig (com.yahoo.container.jdisc.ContainerMbusConfig)1 DocumentmanagerConfig (com.yahoo.document.config.DocumentmanagerConfig)1 ClusterControllerContainer (com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerContainer)1 ContainerModel (com.yahoo.vespa.model.container.ContainerModel)1 Before (org.junit.Before)1 Test (org.junit.Test)1