diff options
Diffstat (limited to 'config-model/src/main')
3 files changed, 29 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilder.java index d9ef5fd2123..c512c2062d7 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilder.java @@ -66,10 +66,22 @@ public class DomSearchTuningBuilder extends VespaDomBuilder.DomConfigProducerBui handleFeeding(e, t.searchNode); } else if (equals("removed-db", e)) { handleRemovedDB(e, t.searchNode); + } else if (equals("lidspace", e)) { + handleLidSpace(e, t.searchNode); } } } + private void handleLidSpace(Element spec, Tuning.SearchNode t) { + t.lidSpace = new Tuning.SearchNode.LidSpace(); + for (Element e : XML.getChildren(spec)) { + if (equals("bloat-factor", e)) { + t.lidSpace.bloatFactor = asDouble(e); + } + } + + } + private void handleRequestThreads(Element spec, Tuning.SearchNode sn) { sn.threads = new Tuning.SearchNode.RequestThreads(); Tuning.SearchNode.RequestThreads rt = sn.threads; @@ -180,9 +192,9 @@ public class DomSearchTuningBuilder extends VespaDomBuilder.DomConfigProducerBui Tuning.SearchNode.Index.Warmup warmup = sn.index.warmup; for (Element e2 : XML.getChildren(e)) { if (equals("time", e2)) { - warmup.time = Double.valueOf(asString(e2)); + warmup.time = asDouble(e2); } else if (equals("unpack", e2)) { - warmup.unpack = Boolean.valueOf(asString(e2)); + warmup.unpack = Boolean.parseBoolean(asString(e2)); } } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/Tuning.java b/config-model/src/main/java/com/yahoo/vespa/model/search/Tuning.java index a29b7b90b44..93e3a6e7a19 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/Tuning.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/Tuning.java @@ -53,6 +53,16 @@ public class Tuning extends AnyConfigProducer implements ProtonConfig.Producer { } } + public static class LidSpace implements ProtonConfig.Producer { + public Double bloatFactor = null; + + @Override + public void getConfig(ProtonConfig.Builder builder) { + if (bloatFactor != null) builder.lidspacecompaction.allowedlidbloatfactor(bloatFactor); + } + + } + public static class RemovedDB implements ProtonConfig.Producer { public static class Prune implements ProtonConfig.Producer { @@ -371,6 +381,7 @@ public class Tuning extends AnyConfigProducer implements ProtonConfig.Producer { } public RequestThreads threads = null; + public LidSpace lidSpace = null; public FlushStrategy strategy = null; public Resizing resizing = null; public Index index = null; @@ -383,6 +394,7 @@ public class Tuning extends AnyConfigProducer implements ProtonConfig.Producer { @Override public void getConfig(ProtonConfig.Builder builder) { if (threads != null) threads.getConfig(builder); + if (lidSpace != null) lidSpace.getConfig(builder); if (strategy != null) strategy.getConfig(builder); if (resizing != null) resizing.getConfig(builder); if (index != null) index.getConfig(builder); diff --git a/config-model/src/main/resources/schema/content.rnc b/config-model/src/main/resources/schema/content.rnc index 6486fdacc18..43975356263 100644 --- a/config-model/src/main/resources/schema/content.rnc +++ b/config-model/src/main/resources/schema/content.rnc @@ -301,6 +301,9 @@ Tuning = element tuning { element persearch { xsd:nonNegativeInteger }? & element summary { xsd:nonNegativeInteger }? }? & + element lidspace { + element bloat-factor { xsd:double { minInclusive = "0.0" maxInclusive = "1.0" } }? + }? & element flushstrategy { element native { element total { |