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());
}
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());
}
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());
}
Aggregations