use of com.yahoo.vespa.config.search.core.ProtonConfig in project vespa by vespa-engine.
the class ContentBuilderTest method ensureOverrideAppendedOnlyOnce.
@Test
@Ignore
public void ensureOverrideAppendedOnlyOnce() throws Exception {
ContentCluster content = createContent("<content version='1.0' id='search'>" + " <config name=\"vespa.config.search.core.proton\">" + " <numthreadspersearch>1</numthreadspersearch>" + " <search>" + " <mmap>" + " <options><item>POPULATE</item></options>" + " </mmap>" + " </search>" + " </config>" + " <redundancy>2</redundancy>" + " <documents>" + " <document type='music' mode='index'/>" + " </documents>" + " <group>" + " <node hostalias='mockhost' distribution-key='0'/>" + " </group>" + "</content>");
ProtonConfig.Builder builder = new ProtonConfig.Builder();
content.getSearch().getIndexed().getSearchNode(0).cascadeConfig(builder);
content.getSearch().getIndexed().getSearchNode(0).addUserConfig(builder);
ProtonConfig config = new ProtonConfig(builder);
assertThat(config.search().mmap().options().size(), is(1));
assertThat(config.search().mmap().options(0), is(ProtonConfig.Search.Mmap.Options.POPULATE));
}
use of com.yahoo.vespa.config.search.core.ProtonConfig in project vespa by vespa-engine.
the class ClusterTest method requireThatVisibilityDelayIsZeroForGlobalDocumentType.
@Test
public void requireThatVisibilityDelayIsZeroForGlobalDocumentType() throws ParseException {
ContentCluster cluster = newContentCluster(joinLines("<search>", " <visibility-delay>2.3</visibility-delay>", "</search>"), true);
ProtonConfig proton = getProtonConfig(cluster);
assertEquals(0.0, proton.documentdb(0).visibilitydelay(), 1E-6);
}
use of com.yahoo.vespa.config.search.core.ProtonConfig in project vespa by vespa-engine.
the class IndexedTest method testMixedIndexAndStoreOnly.
@Test
public void testMixedIndexAndStoreOnly() {
String services = "<services version='1.0'>" + " <admin version='2.0'><adminserver hostalias='node0' /></admin>" + " <content id='docstore' version=\"1.0\">" + " <redundancy>1</redundancy>" + " <documents>" + " <document type=\"index_me\" mode=\"index\"/>" + " <document type=\"store_me\" mode=\"store-only\"/>" + " </documents>" + " <group>" + " <node distribution-key=\"0\" hostalias=\"node0\"/>" + " </group>" + " </content>" + "</services>";
List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("index_me", "store_me");
VespaModel model = new VespaModelCreatorWithMockPkg(getHosts(), services, sds).create();
ProtonConfig.Builder pb = new ProtonConfig.Builder();
model.getConfig(pb, "docstore/search/cluster.docstore/0");
ProtonConfig protonConfig = new ProtonConfig(pb);
assertEquals(2, protonConfig.documentdb().size());
assertEquals("index_me", protonConfig.documentdb(0).inputdoctypename());
assertEquals("docstore/search/cluster.docstore/index_me", protonConfig.documentdb(0).configid());
assertEquals("store_me", protonConfig.documentdb(1).inputdoctypename());
assertEquals("docstore/search", protonConfig.documentdb(1).configid());
}
use of com.yahoo.vespa.config.search.core.ProtonConfig in project vespa by vespa-engine.
the class NodeFlavorTuningTest method require_that_hwinfo_cpu_cores_is_set.
@Test
public void require_that_hwinfo_cpu_cores_is_set() {
ProtonConfig cfg = configFromNumCoresSetting(24);
assertEquals(24, cfg.hwinfo().cpu().cores());
}
use of com.yahoo.vespa.config.search.core.ProtonConfig in project vespa by vespa-engine.
the class NodeFlavorTuningTest method require_that_fast_disk_is_reflected_in_proton_config.
@Test
public void require_that_fast_disk_is_reflected_in_proton_config() {
ProtonConfig cfg = configFromDiskSetting(true);
assertEquals(200, cfg.hwinfo().disk().writespeed(), 0.001);
assertEquals(100, cfg.hwinfo().disk().slowwritespeedlimit(), 0.001);
}
Aggregations