use of com.yahoo.vespa.config.search.core.ProtonConfig in project vespa by vespa-engine.
the class ContentSearchClusterTest method require_that_document_types_with_references_are_topologically_sorted.
@Test
public void require_that_document_types_with_references_are_topologically_sorted() throws Exception {
ProtonConfig cfg = getProtonConfig(createClusterWithThreeDocumentTypes());
assertEquals(3, cfg.documentdb().size());
assertDocumentDb("c", true, cfg.documentdb(0));
assertDocumentDb("b", true, cfg.documentdb(1));
assertDocumentDb("a", false, cfg.documentdb(2));
}
use of com.yahoo.vespa.config.search.core.ProtonConfig in project vespa by vespa-engine.
the class ContentSearchClusterTest method requireThatGloballyDistributedDocumentTypeIsTaggedAsSuch.
@Test
public void requireThatGloballyDistributedDocumentTypeIsTaggedAsSuch() throws Exception {
ProtonConfig cfg = getProtonConfig(createClusterWithGlobalType());
assertEquals(2, cfg.documentdb().size());
assertDocumentDb("global", true, cfg.documentdb(0));
assertDocumentDb("regular", false, cfg.documentdb(1));
}
use of com.yahoo.vespa.config.search.core.ProtonConfig in project vespa by vespa-engine.
the class ContentSearchClusterTest method assertProtonResourceLimits.
private static void assertProtonResourceLimits(double expDiskLimit, double expMemoryLimits, String clusterXml) throws Exception {
ProtonConfig cfg = getProtonConfig(createCluster(clusterXml));
assertEquals(expDiskLimit, cfg.writefilter().disklimit(), EPSILON);
assertEquals(expMemoryLimits, cfg.writefilter().memorylimit(), EPSILON);
}
use of com.yahoo.vespa.config.search.core.ProtonConfig in project vespa by vespa-engine.
the class ContentBuilderTest method handleProtonTuning.
@Test
public void handleProtonTuning() throws Exception {
ContentCluster a = createContent("<content version =\"1.0\" id=\"a\">" + " <redundancy>3</redundancy>" + " <engine>" + " <proton>" + " <tuning>" + " <searchnode>" + " <summary>" + " <store>" + " <cache>" + " <maxsize>8192</maxsize>" + " <compression>" + " <type>lz4</type>" + " <level>8</level>" + " </compression>" + " </cache>" + " </store>" + " <io>" + " <read>directio</read>" + " </io>" + " </summary>" + " </searchnode>" + " </tuning>" + " </proton>" + " </engine>" + " <documents>" + " <document type='music' mode='index'/>" + " </documents>" + " <group>" + " <node hostalias=\"mockhost\" distribution-key=\"0\"/>" + " </group>" + "</content>");
assertTrue(a.getPersistence() instanceof ProtonEngine.Factory);
ProtonConfig.Builder pb = new ProtonConfig.Builder();
a.getSearch().getConfig(pb);
List<String> serialize = ConfigInstance.serialize(new ProtonConfig(pb));
String cfg = StringUtilities.implode(serialize.toArray(new String[serialize.size()]), "\n");
assertThat(cfg, containsString("summary.cache.maxbytes 8192"));
assertThat(cfg, containsString("summary.cache.compression.level 8"));
assertThat(cfg, containsString("summary.cache.compression.type LZ4"));
assertThat(cfg, containsString("summary.read.io DIRECTIO"));
}
use of com.yahoo.vespa.config.search.core.ProtonConfig in project vespa by vespa-engine.
the class IndexedSearchNodeNamingTest method assertBaseDir.
private void assertBaseDir(String expected, SearchNode node) {
ProtonConfig.Builder builder = new ProtonConfig.Builder();
node.getConfig(builder);
ProtonConfig cfg = new ProtonConfig(builder);
assertEquals(expected, cfg.basedir());
}
Aggregations