Search in sources :

Example 11 with StorDistributormanagerConfig

use of com.yahoo.vespa.config.content.core.StorDistributormanagerConfig in project vespa by vespa-engine.

the class DistributorTest method bucket_activation_enabled_if_at_least_one_document_indexed.

@Test
public void bucket_activation_enabled_if_at_least_one_document_indexed() {
    StorDistributormanagerConfig config = clusterXmlToConfig(generateXmlForDocTypes(DocType.storeOnly("music"), DocType.streaming("bunnies"), DocType.index("movies")));
    assertThat(config.disable_bucket_activation(), is(false));
}
Also used : StorDistributormanagerConfig(com.yahoo.vespa.config.content.core.StorDistributormanagerConfig) Test(org.junit.Test)

Example 12 with StorDistributormanagerConfig

use of com.yahoo.vespa.config.content.core.StorDistributormanagerConfig in project vespa by vespa-engine.

the class DistributorTest method testThatGroupsAreCountedInWhenComputingSplitBits.

@Test
public void testThatGroupsAreCountedInWhenComputingSplitBits() {
    StorDistributormanagerConfig.Builder builder = new StorDistributormanagerConfig.Builder();
    ContentCluster cluster = parseCluster("<cluster id=\"storage\">\n" + "  <documents/>" + "    <engine>" + "       <vds/>" + "    </engine>" + "    <tuning>" + "      <distribution type=\"legacy\"/>" + "    </tuning>\n" + "  <group>" + "     <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + "     <node distribution-key=\"1\" hostalias=\"mockhost\"/>" + "  </group>" + "</cluster>");
    cluster.getConfig(builder);
    StorDistributormanagerConfig conf = new StorDistributormanagerConfig(builder);
    assertEquals(1024, conf.splitcount());
    assertEquals(512, conf.joincount());
    assertEquals(33544432, conf.splitsize());
    assertEquals(16000000, conf.joinsize());
    assertEquals(8, conf.minsplitcount());
    assertEquals(true, conf.inlinebucketsplitting());
    cluster = parseCluster("<cluster id=\"storage\">\n" + "  <documents/>" + "    <engine>" + "       <vds/>" + "    </engine>" + "    <tuning>" + "      <distribution type=\"legacy\"/>" + "    </tuning>\n" + "  <group>" + "    <distribution partitions=\"1|*\"/>" + "    <group name=\"a\" distribution-key=\"0\">" + "       <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + "    </group>" + "    <group name=\"b\" distribution-key=\"1\">" + "       <node distribution-key=\"1\" hostalias=\"mockhost\"/>" + "    </group>" + "  </group>" + "</cluster>");
    cluster.getConfig(builder);
    conf = new StorDistributormanagerConfig(builder);
    assertEquals(1024, conf.splitcount());
    assertEquals(512, conf.joincount());
    assertEquals(33544432, conf.splitsize());
    assertEquals(16000000, conf.joinsize());
    assertEquals(1, conf.minsplitcount());
    assertEquals(true, conf.inlinebucketsplitting());
}
Also used : StorDistributormanagerConfig(com.yahoo.vespa.config.content.core.StorDistributormanagerConfig) ContentCluster(com.yahoo.vespa.model.content.cluster.ContentCluster) Test(org.junit.Test)

Example 13 with StorDistributormanagerConfig

use of com.yahoo.vespa.config.content.core.StorDistributormanagerConfig in project vespa by vespa-engine.

the class DistributorTest method testMaxMergesPerNode.

@Test
public void testMaxMergesPerNode() {
    StorDistributormanagerConfig.Builder builder = new StorDistributormanagerConfig.Builder();
    DistributorCluster dcluster = parse("<content id=\"storage\">\n" + "  <documents/>" + "  <group>" + "     <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + "  </group>" + "</content>");
    ((ContentCluster) dcluster.getParent()).getConfig(builder);
    StorDistributormanagerConfig conf = new StorDistributormanagerConfig(builder);
    assertEquals(16, conf.maximum_nodes_per_merge());
    builder = new StorDistributormanagerConfig.Builder();
    dcluster = parse("<content id=\"storage\">\n" + "  <documents/>" + "  <tuning>\n" + "    <merges max-nodes-per-merge=\"4\"/>\n" + "  </tuning>\n" + "  <group>" + "     <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + "  </group>" + "</content>");
    ((ContentCluster) dcluster.getParent()).getConfig(builder);
    conf = new StorDistributormanagerConfig(builder);
    assertEquals(4, conf.maximum_nodes_per_merge());
}
Also used : StorDistributormanagerConfig(com.yahoo.vespa.config.content.core.StorDistributormanagerConfig) ContentCluster(com.yahoo.vespa.model.content.cluster.ContentCluster) Test(org.junit.Test)

Example 14 with StorDistributormanagerConfig

use of com.yahoo.vespa.config.content.core.StorDistributormanagerConfig in project vespa by vespa-engine.

the class DistributorTest method testGarbageCollectionSetExplicitly.

@Test
public void testGarbageCollectionSetExplicitly() {
    StorDistributormanagerConfig.Builder builder = new StorDistributormanagerConfig.Builder();
    parse("<cluster id=\"storage\">\n" + "  <documents garbage-collection=\"true\">\n" + "    <document type=\"music\"/>\n" + "  </documents>\n" + "  <group>" + "     <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + "  </group>" + "</cluster>").getConfig(builder);
    StorDistributormanagerConfig conf = new StorDistributormanagerConfig(builder);
    assertEquals(3600, conf.garbagecollection().interval());
    assertEquals("not ((music))", conf.garbagecollection().selectiontoremove());
}
Also used : StorDistributormanagerConfig(com.yahoo.vespa.config.content.core.StorDistributormanagerConfig) Test(org.junit.Test)

Example 15 with StorDistributormanagerConfig

use of com.yahoo.vespa.config.content.core.StorDistributormanagerConfig in project vespa by vespa-engine.

the class DistributorTest method bucket_activation_disabled_for_single_streaming_type.

@Test
public void bucket_activation_disabled_for_single_streaming_type() {
    StorDistributormanagerConfig config = clusterXmlToConfig(generateXmlForDocTypes(DocType.streaming("music")));
    assertThat(config.disable_bucket_activation(), is(true));
}
Also used : StorDistributormanagerConfig(com.yahoo.vespa.config.content.core.StorDistributormanagerConfig) Test(org.junit.Test)

Aggregations

StorDistributormanagerConfig (com.yahoo.vespa.config.content.core.StorDistributormanagerConfig)15 Test (org.junit.Test)14 ContentCluster (com.yahoo.vespa.model.content.cluster.ContentCluster)2 ContentClusterBuilder (com.yahoo.vespa.model.content.utils.ContentClusterBuilder)2 SearchDefinitionBuilder (com.yahoo.vespa.model.content.utils.SearchDefinitionBuilder)2 FleetcontrollerConfig (com.yahoo.vespa.config.content.FleetcontrollerConfig)1 StorFilestorConfig (com.yahoo.vespa.config.content.StorFilestorConfig)1 VespaModel (com.yahoo.vespa.model.VespaModel)1 ProtonEngine (com.yahoo.vespa.model.content.engines.ProtonEngine)1 VespaModelCreatorWithMockPkg (com.yahoo.vespa.model.test.utils.VespaModelCreatorWithMockPkg)1