Search in sources :

Example 1 with ThreadpoolConfig

use of com.yahoo.container.handler.ThreadpoolConfig in project vespa by vespa-engine.

the class ContainerClusterTest method testContainerClusterMaxThreads.

@Test
public void testContainerClusterMaxThreads() {
    ContainerCluster cluster = createContainerCluster(false, false);
    addContainer(cluster, "c1", "host-c1");
    ThreadpoolConfig.Builder tpBuilder = new ThreadpoolConfig.Builder();
    cluster.getConfig(tpBuilder);
    ThreadpoolConfig threadpoolConfig = new ThreadpoolConfig(tpBuilder);
    assertEquals(500, threadpoolConfig.maxthreads());
}
Also used : ThreadpoolConfig(com.yahoo.container.handler.ThreadpoolConfig) Test(org.junit.Test)

Example 2 with ThreadpoolConfig

use of com.yahoo.container.handler.ThreadpoolConfig 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

ThreadpoolConfig (com.yahoo.container.handler.ThreadpoolConfig)2 Test (org.junit.Test)2 QrStartConfig (com.yahoo.search.config.QrStartConfig)1 ClusterControllerContainer (com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerContainer)1