summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorgjoranv <gjoranv@gmail.com>2017-01-16 12:07:10 +0100
committerGitHub <noreply@github.com>2017-01-16 12:07:10 +0100
commit0664ba96e02fbc64015bf1e4bdeca65ba23d96f1 (patch)
tree1427a0acca639cd00b86ce28df19cfc00054851c /config-model
parentba57836502a3935187f83d9c3682520f391515ea (diff)
parent7393983d2f3bd3d5e003a5de3faeaa6a8d814471 (diff)
Merge pull request #1488 from yahoo/gjoranv/access-control-preparations
Gjoranv/access control preparations
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/chains/DomChainsBuilder.java10
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java2
-rw-r--r--config-model/src/main/resources/schema/content.rnc87
-rw-r--r--config-model/src/main/resources/schema/search.rnc241
-rw-r--r--config-model/src/main/resources/schema/searchchains.rnc4
-rw-r--r--config-model/src/main/resources/schema/services.rnc1
6 files changed, 89 insertions, 256 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/chains/DomChainsBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/chains/DomChainsBuilder.java
index 9555d916d2e..a18d1533890 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/chains/DomChainsBuilder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/chains/DomChainsBuilder.java
@@ -34,16 +34,6 @@ class DomChainsBuilder<COMPONENT extends ChainedComponent<?>, CHAIN extends Chai
String appPkgChainsDir) {
this.outerChainsElem = outerChainsElem;
-
- // XXX: hack to prevent 'config' in the outer chains elem.
- // TODO: Remove when this can be handled by schema, i.e. when we don't need the non-cluster qrservers syntax anymore
- if (outerChainsElem != null) {
- if (XML.getChildren(outerChainsElem, "config").size() > 0) {
- throw new RuntimeException("At node " + XML.getNodePath(outerChainsElem, " > ") + ": " +
- "'config' is not allowed in the outer chains element, please move it up one level!");
- }
- }
-
this.allowedComponentTypes = new ArrayList<>(allowedComponentTypes);
this.appPkgChainsDir = appPkgChainsDir;
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java
index 9c8e0199104..06edb20ef92 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java
@@ -149,7 +149,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> {
addClientProviders(spec, cluster);
addServerProviders(spec, cluster);
- addLegacyFilters(spec, cluster);
+ addLegacyFilters(spec, cluster); // TODO: Remove for Vespa 7
addDefaultHandlers(cluster);
addStatusHandlers(cluster, context);
diff --git a/config-model/src/main/resources/schema/content.rnc b/config-model/src/main/resources/schema/content.rnc
index c3a8386ac5e..a1fef689253 100644
--- a/config-model/src/main/resources/schema/content.rnc
+++ b/config-model/src/main/resources/schema/content.rnc
@@ -1,6 +1,9 @@
# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+include "container.rnc"
+include "searchchains.rnc"
+
Redundancy = element redundancy {
attribute reply-after { xsd:nonNegativeInteger }? &
xsd:nonNegativeInteger
@@ -275,3 +278,87 @@ Group = element group {
)
)
}
+
+Tuning = element tuning {
+ element dispatch {
+ element max-hits-per-partition { xsd:nonNegativeInteger }?
+ }? &
+ element searchnode {
+ element requestthreads {
+ element search { xsd:nonNegativeInteger }? &
+ element persearch { xsd:nonNegativeInteger }? &
+ element summary { xsd:nonNegativeInteger }?
+ }? &
+ element flushstrategy {
+ element native {
+ element total {
+ element maxmemorygain { xsd:nonNegativeInteger }? &
+ element diskbloatfactor { xsd:double { minInclusive = "0.0" } }?
+ }? &
+ element component {
+ element maxmemorygain { xsd:nonNegativeInteger }? &
+ element diskbloatfactor { xsd:double { minInclusive = "0.0" } }? &
+ element maxage { xsd:nonNegativeInteger }?
+ }? &
+ element transactionlog {
+ element maxentries { xsd:nonNegativeInteger }? &
+ element maxsize { xsd:nonNegativeInteger }?
+ }? &
+ element conservative {
+ element memory-limit-factor { xsd:double { minInclusive = "0.0" maxInclusive = "1.0" } }? &
+ element disk-limit-factor { xsd:double { minInclusive = "0.0" maxInclusive = "1.0" } }?
+ }?
+ }?
+ }? &
+ element resizing {
+ element initialdocumentcount { xsd:nonNegativeInteger }?
+ }? &
+ element index {
+ element io {
+ element write { TuningIoOptionsLight }? &
+ element read { TuningIoOptionsLight }? &
+ element search { TuningIoOptionsFull }?
+ }
+ }? &
+ element attribute {
+ element io {
+ element write { TuningIoOptionsLight }?
+ }
+ }? &
+ element summary {
+ element io {
+ element write { TuningIoOptionsLight }? &
+ element read { TuningIoOptionsFull }?
+ }? &
+ element store {
+ element cache {
+ element maxsize { xsd:nonNegativeInteger }? &
+ element initialentries { xsd:nonNegativeInteger }? &
+ element maxentries { xsd:nonNegativeInteger }? &
+ TuningCompression?
+ }? &
+ element logstore {
+ element maxfilesize { xsd:nonNegativeInteger }? &
+ element maxdiskbloatfactor { xsd:double { minInclusive = "0.0" } }? &
+ element minfilesizefactor { xsd:double { minInclusive = "0.10" maxInclusive = "1.0" } }? &
+ element chunk {
+ element maxsize { xsd:nonNegativeInteger }? &
+ element maxentries { xsd:nonNegativeInteger }? &
+ TuningCompression?
+ }?
+ }?
+ }?
+ }? &
+ element initialize {
+ element threads { xsd:nonNegativeInteger }?
+ }?
+ }?
+}
+
+TuningIoOptionsLight = string "normal" | string "directio"
+TuningIoOptionsFull = string "normal" | string "directio" | string "mmap" | string "mlock"
+
+TuningCompression = element compression {
+ element type { string "none" | string "lz4" }? &
+ element level { xsd:nonNegativeInteger }?
+}
diff --git a/config-model/src/main/resources/schema/search.rnc b/config-model/src/main/resources/schema/search.rnc
deleted file mode 100644
index 278ac394c9a..00000000000
--- a/config-model/src/main/resources/schema/search.rnc
+++ /dev/null
@@ -1,241 +0,0 @@
-# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
-
-include "searchchains.rnc"
-include "container.rnc"
-
-Search = element search {
- attribute version { "2.0" } &
- GenericConfig* &
- (QrserversWithClusters | QRServers)? &
- SearchDefinitions? &
- SCluster*
-}
-
-ModeStreaming = attribute indexingmode { string "streaming" | string "STREAMING" } &
- attribute storagecluster { xsd:NCName }
-
-QRServerOptionsElems =
- element cacheoptions {
- attribute cluster { list { xsd:NCName+ } }? &
- ## Size in megabytes
- element size { xsd:nonNegativeInteger }?
- }* &
- element resultlimits {
- attribute maxhits { xsd:nonNegativeInteger }? &
- attribute maxoffset { xsd:nonNegativeInteger }? &
- attribute maxgroups { xsd:nonNegativeInteger }?
- }? &
- element accesslog { string "queryaccesslog" | string "yapacheaccesslog" | string "disabled" }?
-
-SearchDefinitions = element searchdefinitions {
- element searchdefinition {
- attribute name { text }
- }+
-}
-
-TopLevelDispatchers = element topleveldispatchers {
- element topleveldispatcher {
- attribute preferlocalrow { text }? &
- service.attlist &
- GenericConfig*
- }+ &
- GenericConfig*
-}
-
-QRServers = element qrservers {
- GenericConfig* &
- Container &
- element qrserveroptions {
- QRServerOptionsElems
- }? &
- attribute jvmargs { text }? &
- attribute preload { text }? &
- element qrserver {
- service.attlist &
- GenericConfig*
- }+ &
- element cache {
- attribute size { xsd:string { pattern = "\d+(\.\d*)?\s*[kmgKMG]?" } }
- }?
-}
-
-QrserversWithClusters = element qrservers {
- GenericConfig* &
- OuterSearchChains? &
- element cluster {
- attribute name { xsd:NCName } &
- GenericConfig* &
- Container &
- element qrserveroptions {
- QRServerOptionsElems
- }? &
- element nodes {
- attribute jvmargs { text }? &
- attribute preload { text }? &
- element node {
- service.attlist &
- GenericConfig*
- }+
- }+ &
- element cache {
- attribute size { xsd:string { pattern = "\d+(\.\d*)?\s*[kmgKMG]?" } }
- }?
- }+
-}
-
-Container =
- Handler* &
- Client* &
- Server* &
- Component* &
- HttpFilter? &
- Renderer* &
- SearchChains? &
- Processing?
-
-ModeRealTime = attribute indexingmode { string "realtime" | string "REALTIME" }
-
-ClusterCommon = attribute name { xsd:NCName }? &
- GenericConfig* &
- ( ModeRealTime | ModeStreaming )? &
- # TODO: Rename?
- element visibilitydelay { xsd:double { minInclusive = "0.0" } }? &
- element querytimeout { xsd:double { minInclusive = "0.0" } }? &
- SearchDefinitions
-
-
-Indexing = element indexing {
- attribute indexingclustername { text }? &
- attribute chain { text }? &
- #Below element is deprecated and has no effect:
- element documentprocessors {
- DocumentProcessorV3+
- }?
-}
-
-SCluster = element cluster {
- # name defaults to 'search'
- ClusterCommon &
- attribute minnodespercolumn { xsd:nonNegativeInteger }? &
- Indexing? &
- element documents {
- attribute feedname { text }?,
- # TODO: check if 'true' works for getting all, and disallow empty in selection language.
- attribute selection { text }?
- }? &
- # TODO: remove in the future...
- element resultlimits {
- attribute maxhits { xsd:nonNegativeInteger }? &
- attribute maxoffset { xsd:nonNegativeInteger }?
- }? &
- element oos {
- attribute auto { xsd:boolean } &
- attribute timeout { xsd:nonNegativeInteger }? &
- attribute min-in-service-per-column { xsd:positiveInteger }?
- }? &
- # Default is that one clustercontroller is created on a qrserver node in javacode
- element clustercontrollers {
- element clustercontroller { service.attlist & GenericConfig* }+
- }? &
- # Defaults is that two topleveldispatchers are created (one each on different
- # qrserver nodes, only one created if one qrserver node specified) in javacode
- TopLevelDispatchers? &
- element row {
- GenericConfig* &
- (attribute index { xsd:nonNegativeInteger },
- element searchnodes {
- element searchnode {
- service.attlist &
- GenericConfig* &
- attribute index { xsd:nonNegativeInteger } &
- attribute engine { text }?
- }+
- })
- }* &
- Tuning?
-}
-
-Tuning = element tuning {
- element dispatch {
- element max-hits-per-partition { xsd:nonNegativeInteger }?
- }? &
- element searchnode {
- element requestthreads {
- element search { xsd:nonNegativeInteger }? &
- element persearch { xsd:nonNegativeInteger }? &
- element summary { xsd:nonNegativeInteger }?
- }? &
- element flushstrategy {
- element native {
- element total {
- element maxmemorygain { xsd:nonNegativeInteger }? &
- element diskbloatfactor { xsd:double { minInclusive = "0.0" } }?
- }? &
- element component {
- element maxmemorygain { xsd:nonNegativeInteger }? &
- element diskbloatfactor { xsd:double { minInclusive = "0.0" } }? &
- element maxage { xsd:nonNegativeInteger }?
- }? &
- element transactionlog {
- element maxentries { xsd:nonNegativeInteger }? &
- element maxsize { xsd:nonNegativeInteger }?
- }? &
- element conservative {
- element memory-limit-factor { xsd:double { minInclusive = "0.0" maxInclusive = "1.0" } }? &
- element disk-limit-factor { xsd:double { minInclusive = "0.0" maxInclusive = "1.0" } }?
- }?
- }?
- }? &
- element resizing {
- element initialdocumentcount { xsd:nonNegativeInteger }?
- }? &
- element index {
- element io {
- element write { TuningIoOptionsLight }? &
- element read { TuningIoOptionsLight }? &
- element search { TuningIoOptionsFull }?
- }
- }? &
- element attribute {
- element io {
- element write { TuningIoOptionsLight }?
- }
- }? &
- element summary {
- element io {
- element write { TuningIoOptionsLight }? &
- element read { TuningIoOptionsFull }?
- }? &
- element store {
- element cache {
- element maxsize { xsd:nonNegativeInteger }? &
- element initialentries { xsd:nonNegativeInteger }? &
- element maxentries { xsd:nonNegativeInteger }? &
- TuningCompression?
- }? &
- element logstore {
- element maxfilesize { xsd:nonNegativeInteger }? &
- element maxdiskbloatfactor { xsd:double { minInclusive = "0.0" } }? &
- element minfilesizefactor { xsd:double { minInclusive = "0.10" maxInclusive = "1.0" } }? &
- element chunk {
- element maxsize { xsd:nonNegativeInteger }? &
- element maxentries { xsd:nonNegativeInteger }? &
- TuningCompression?
- }?
- }?
- }?
- }? &
- element initialize {
- element threads { xsd:nonNegativeInteger }?
- }?
- }?
-}
-
-TuningIoOptionsLight = string "normal" | string "directio"
-TuningIoOptionsFull = string "normal" | string "directio" | string "mmap" | string "mlock"
-
-TuningCompression = element compression {
- element type { string "none" | string "lz4" }? &
- element level { xsd:nonNegativeInteger }?
-}
diff --git a/config-model/src/main/resources/schema/searchchains.rnc b/config-model/src/main/resources/schema/searchchains.rnc
index 8b11b900557..7b206658634 100644
--- a/config-model/src/main/resources/schema/searchchains.rnc
+++ b/config-model/src/main/resources/schema/searchchains.rnc
@@ -10,12 +10,10 @@ SearchChains =
GenericConfig*
}
-# TODO: Cannot have generic config (see bug #4766780)
OuterSearchChains =
element searchchains {
Searcher* &
- SearchChainInQrservers* &
- GenericConfig* # TODO: Remove when we no longer need the QRServersV2 syntax (qrs without clusters)
+ SearchChainInQrservers*
}
SearchChainInQrservers =
diff --git a/config-model/src/main/resources/schema/services.rnc b/config-model/src/main/resources/schema/services.rnc
index c52ed90bbd4..31001fa1d8e 100644
--- a/config-model/src/main/resources/schema/services.rnc
+++ b/config-model/src/main/resources/schema/services.rnc
@@ -5,7 +5,6 @@ include "clients.rnc"
include "content.rnc"
include "docproc.rnc"
include "storage.rnc"
-include "search.rnc"
include "routing.rnc"
include "containercluster.rnc"
include "genericcluster.rnc"