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