Search in sources :

Example 6 with StorDistributormanagerConfig

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

the class DistributorTest method bucket_activation_enabled_with_multiple_indexed_documents.

@Test
public void bucket_activation_enabled_with_multiple_indexed_documents() {
    StorDistributormanagerConfig config = clusterXmlToConfig(generateXmlForDocTypes(DocType.index("music"), 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 7 with StorDistributormanagerConfig

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

the class DistributorTest method testGarbageCollectionDisabledIfForced.

@Test
public void testGarbageCollectionDisabledIfForced() {
    StorDistributormanagerConfig.Builder builder = new StorDistributormanagerConfig.Builder();
    parse("<cluster id=\"foo\">\n" + "  <documents selection=\"true\" garbage-collection=\"false\" garbage-collection-interval=\"30\">\n" + "    <document type=\"music\" selection=\"music.year &lt; now()\"/>\n" + "    <document type=\"movies\" selection=\"movies.year &lt; now() - 1200\"/>\n" + "  </documents>\n" + "  <group>" + "     <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + "  </group>" + "</cluster>").getConfig(builder);
    StorDistributormanagerConfig conf = new StorDistributormanagerConfig(builder);
    assertEquals(0, conf.garbagecollection().interval());
    assertEquals("", conf.garbagecollection().selectiontoremove());
}
Also used : StorDistributormanagerConfig(com.yahoo.vespa.config.content.core.StorDistributormanagerConfig) Test(org.junit.Test)

Example 8 with StorDistributormanagerConfig

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

the class DistributorTest method testComplexGarbageCollectionSelectionForIndexedSearch.

@Test
public void testComplexGarbageCollectionSelectionForIndexedSearch() {
    StorDistributormanagerConfig.Builder builder = new StorDistributormanagerConfig.Builder();
    parse("<cluster id=\"foo\">\n" + "  <documents garbage-collection=\"true\" selection=\"true\">" + "    <document type=\"music\" selection=\"music.year &lt; now()\"/>\n" + "    <document type=\"movies\" selection=\"movies.year &lt; now() - 1200\"/>\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 ((true) and ((music and (music.year < now())) or (movies and (movies.year < now() - 1200))))", conf.garbagecollection().selectiontoremove());
}
Also used : StorDistributormanagerConfig(com.yahoo.vespa.config.content.core.StorDistributormanagerConfig) Test(org.junit.Test)

Example 9 with StorDistributormanagerConfig

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

the class DistributorTest method testGarbageCollectionOffByDefault.

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

Example 10 with StorDistributormanagerConfig

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

the class DistributorTest method testSplitAndJoin.

@Test
public void testSplitAndJoin() {
    StorDistributormanagerConfig.Builder builder = new StorDistributormanagerConfig.Builder();
    parse("<cluster id=\"storage\">\n" + "  <documents/>" + "    <engine>" + "       <vds/>" + "    </engine>" + "    <tuning>\n" + "      <bucket-splitting max-documents=\"2K\" max-size=\"25M\" minimum-bits=\"8\" />\n" + "    </tuning>\n" + "  <group>" + "     <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + "  </group>" + "</cluster>").getConfig(builder);
    StorDistributormanagerConfig conf = new StorDistributormanagerConfig(builder);
    assertEquals(2048, conf.splitcount());
    assertEquals(1024, conf.joincount());
    assertEquals(26214400, conf.splitsize());
    assertEquals(13107200, conf.joinsize());
    assertEquals(8, conf.minsplitcount());
    assertEquals(true, conf.inlinebucketsplitting());
}
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