use of com.yahoo.vespa.config.content.core.StorDistributormanagerConfig in project vespa by vespa-engine.
the class ClusterTest method assertDistributionBitsInConfig.
private void assertDistributionBitsInConfig(ContentCluster cluster, int distributionBits) {
FleetcontrollerConfig.Builder builder = new FleetcontrollerConfig.Builder();
cluster.getConfig(builder);
cluster.getClusterControllerConfig().getConfig(builder);
FleetcontrollerConfig config = new FleetcontrollerConfig(builder);
assertEquals(distributionBits, config.ideal_distribution_bits());
StorDistributormanagerConfig.Builder sdBuilder = new StorDistributormanagerConfig.Builder();
cluster.getConfig(sdBuilder);
StorDistributormanagerConfig storDistributormanagerConfig = new StorDistributormanagerConfig(sdBuilder);
assertEquals(distributionBits, storDistributormanagerConfig.minsplitcount());
}
use of com.yahoo.vespa.config.content.core.StorDistributormanagerConfig in project vespa by vespa-engine.
the class ClusterTest method testSearchTuning.
@Test
public void testSearchTuning() throws Exception {
String xml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" + "<services>\n" + "\n" + " <admin version=\"2.0\">\n" + " <adminserver hostalias=\"node0\" />\n" + " <cluster-controllers>\n" + " <cluster-controller hostalias=\"node0\"/>" + " </cluster-controllers>\n" + " </admin>\n" + " <content version='1.0' id='bar'>" + " <redundancy>1</redundancy>\n" + " <documents>" + " <document type=\"type1\" mode='index'/>\n" + " <document type=\"type2\" mode='index'/>\n" + " </documents>\n" + " <group>" + " <node hostalias='node0' distribution-key='0'/>" + " </group>" + " <tuning>\n" + " <cluster-controller>" + " <init-progress-time>34567</init-progress-time>" + " </cluster-controller>" + " </tuning>" + " </content>" + "\n" + "</services>";
List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("type1", "type2");
VespaModel model = new VespaModelCreatorWithMockPkg(getHosts(), xml, sds).create();
assertTrue(model.getContentClusters().get("bar").getPersistence() instanceof ProtonEngine.Factory);
{
StorDistributormanagerConfig.Builder builder = new StorDistributormanagerConfig.Builder();
model.getConfig(builder, "bar/distributor/0");
StorDistributormanagerConfig config = new StorDistributormanagerConfig(builder);
assertEquals(false, config.inlinebucketsplitting());
}
{
StorFilestorConfig.Builder builder = new StorFilestorConfig.Builder();
model.getConfig(builder, "bar/storage/0");
StorFilestorConfig config = new StorFilestorConfig(builder);
assertEquals(false, config.enable_multibit_split_optimalization());
}
}
use of com.yahoo.vespa.config.content.core.StorDistributormanagerConfig in project vespa by vespa-engine.
the class DistributorTest method testGarbageCollectionInterval.
@Test
public void testGarbageCollectionInterval() {
StorDistributormanagerConfig.Builder builder = new StorDistributormanagerConfig.Builder();
parse("<cluster id=\"storage\">\n" + " <documents garbage-collection=\"true\" garbage-collection-interval=\"30\">\n" + " <document type=\"music\"/>\n" + " </documents>\n" + " <group>" + " <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + " </group>" + "</cluster>").getConfig(builder);
StorDistributormanagerConfig conf = new StorDistributormanagerConfig(builder);
assertEquals(30, conf.garbagecollection().interval());
}
use of com.yahoo.vespa.config.content.core.StorDistributormanagerConfig in project vespa by vespa-engine.
the class DistributorTest method bucket_activation_enabled_with_single_indexed_document.
@Test
public void bucket_activation_enabled_with_single_indexed_document() {
StorDistributormanagerConfig config = clusterXmlToConfig(generateXmlForDocTypes(DocType.index("music")));
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 bucket_activation_disabled_if_no_documents_in_indexed_mode.
@Test
public void bucket_activation_disabled_if_no_documents_in_indexed_mode() {
StorDistributormanagerConfig config = clusterXmlToConfig(generateXmlForDocTypes(DocType.storeOnly("music")));
assertThat(config.disable_bucket_activation(), is(true));
}
Aggregations