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));
}
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 < now()\"/>\n" + " <document type=\"movies\" selection=\"movies.year < 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());
}
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 < now()\"/>\n" + " <document type=\"movies\" selection=\"movies.year < 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());
}
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());
}
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());
}
Aggregations