use of com.yahoo.vespa.config.content.StorFilestorConfig 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.StorFilestorConfig in project vespa by vespa-engine.
the class StorageClusterTest method testPersistenceThreads.
@Test
public void testPersistenceThreads() throws Exception {
StorFilestorConfig.Builder builder = new StorFilestorConfig.Builder();
parse("<cluster id=\"bees\">\n" + " <documents/>" + " <engine>" + " <vds/>" + " </engine>" + " <tuning>\n" + " <persistence-threads>\n" + " <thread lowest-priority=\"VERY_LOW\" count=\"2\"/>\n" + " <thread lowest-priority=\"VERY_HIGH\" count=\"1\"/>\n" + " <thread count=\"1\"/>\n" + " </persistence-threads>\n" + " </tuning>\n" + " <group>" + " <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + " </group>" + "</cluster>").getConfig(builder);
StorFilestorConfig config = new StorFilestorConfig(builder);
assertEquals(4, config.num_threads());
assertEquals(true, config.enable_multibit_split_optimalization());
}
use of com.yahoo.vespa.config.content.StorFilestorConfig in project vespa by vespa-engine.
the class StorageClusterTest method testNoPersistenceThreads.
@Test
public void testNoPersistenceThreads() throws Exception {
StorFilestorConfig.Builder builder = new StorFilestorConfig.Builder();
parse("<cluster id=\"bees\">\n" + " <documents/>" + " <tuning>\n" + " </tuning>\n" + " <group>" + " <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + " </group>" + "</cluster>").getConfig(builder);
StorFilestorConfig config = new StorFilestorConfig(builder);
assertEquals(6, config.num_threads());
}
Aggregations