diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-04-05 23:43:56 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2018-04-05 23:43:56 +0200 |
commit | cc1811b7eab9fd445683835cbced1ab2d042c6f8 (patch) | |
tree | e5904798979e729fbdf4bc05eb2e54f8110db534 /config-model | |
parent | a20eb679819c3f87037f5ff4c8305111b709b5d0 (diff) |
No more engine=vds in config-model
Diffstat (limited to 'config-model')
18 files changed, 34 insertions, 600 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/BucketSplitting.java b/config-model/src/main/java/com/yahoo/vespa/model/content/BucketSplitting.java index 7f720672ef9..9f7494f470d 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/BucketSplitting.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/BucketSplitting.java @@ -12,13 +12,12 @@ public class BucketSplitting implements StorDistributormanagerConfig.Producer { Integer maxDocuments; Integer splitSize; Integer minSplitCount; - boolean useInlineBucketSplitting; public static class Builder { - public BucketSplitting build(ContentCluster cluster, ModelElement clusterElem) { + public BucketSplitting build(ModelElement clusterElem) { ModelElement tuning = clusterElem.getChild("tuning"); if (tuning == null) { - return new BucketSplitting(cluster.isMemfilePersistence(), null, null, null); + return new BucketSplitting(null, null, null); } ModelElement bucketSplitting = tuning.getChild("bucket-splitting"); @@ -27,18 +26,17 @@ public class BucketSplitting implements StorDistributormanagerConfig.Producer { Integer splitSize = bucketSplitting.getIntegerAttribute("max-size"); Integer minSplitCount = bucketSplitting.getIntegerAttribute("minimum-bits"); - return new BucketSplitting(cluster.isMemfilePersistence(), maxDocuments, splitSize, minSplitCount); + return new BucketSplitting(maxDocuments, splitSize, minSplitCount); } - return new BucketSplitting(cluster.isMemfilePersistence(), null, null, null); + return new BucketSplitting(null, null, null); } } - public BucketSplitting(boolean useInlineBucketSplitting, Integer maxDocuments, Integer splitSize, Integer minSplitCount) { + public BucketSplitting(Integer maxDocuments, Integer splitSize, Integer minSplitCount) { this.maxDocuments = maxDocuments; this.splitSize = splitSize; this.minSplitCount = minSplitCount; - this.useInlineBucketSplitting = useInlineBucketSplitting; } @Override @@ -55,6 +53,6 @@ public class BucketSplitting implements StorDistributormanagerConfig.Producer { builder.minsplitcount(minSplitCount); } - builder.inlinebucketsplitting(useInlineBucketSplitting); + builder.inlinebucketsplitting(false); } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java index 0405f96cd89..e60aabd24e8 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java @@ -100,8 +100,7 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl final boolean hasIndexedDocumentType = clusterContainsIndexedDocumentType(documentsNode); return new DistributorCluster(parent, - new BucketSplitting.Builder().build( - parent, new ModelElement(producerSpec)), gc, hasIndexedDocumentType); + new BucketSplitting.Builder().build(new ModelElement(producerSpec)), gc, hasIndexedDocumentType); } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java index fabd7a0cc1a..9378c8c27f9 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java @@ -38,7 +38,6 @@ import com.yahoo.vespa.model.container.xml.ContainerModelBuilder; import com.yahoo.vespa.model.content.*; import com.yahoo.vespa.model.content.engines.PersistenceEngine; import com.yahoo.vespa.model.content.engines.ProtonEngine; -import com.yahoo.vespa.model.content.engines.VDSEngine; import com.yahoo.vespa.model.content.storagecluster.StorageCluster; import com.yahoo.vespa.model.search.IndexedSearchCluster; import com.yahoo.vespa.model.search.MultilevelDispatchValidator; @@ -134,10 +133,6 @@ public class ContentCluster extends AbstractConfigProducer implements StorDistri throw new RuntimeException("If you have indexed search you need to have proton as engine"); } - if (c.isMemfilePersistence()) { - admin.deployLogger().log(Level.WARNING, "'vds' engine is deprecated and will soon be removed. 'proton' is only recommended engine."); - } - if (documentsElement != null) { ModelElement e = documentsElement.getChild("document-processing"); if (e != null) { @@ -515,10 +510,6 @@ public class ContentCluster extends AbstractConfigProducer implements StorDistri return getPersistence().getDefaultDistributionMode(); } - public boolean isMemfilePersistence() { - return persistenceFactory instanceof VDSEngine.Factory; - } - public static String getClusterName(ModelElement clusterElem) { String clusterName = clusterElem.getStringAttribute("id"); if (clusterName == null) { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/EngineFactoryBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/EngineFactoryBuilder.java index 04c5fd4fd72..f8961d81bf4 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/EngineFactoryBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/EngineFactoryBuilder.java @@ -16,9 +16,7 @@ public class EngineFactoryBuilder { } ModelElement e; - if ((e = persistence.getChild("vds")) != null) { - return new VDSEngine.Factory(e); - } else if (persistence.getChild("proton") != null) { + if (persistence.getChild("proton") != null) { return new ProtonEngine.Factory(c.getSearch()); } else if (persistence.getChild("dummy") != null) { return new com.yahoo.vespa.model.content.engines.DummyPersistence.Factory(); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/engines/VDSEngine.java b/config-model/src/main/java/com/yahoo/vespa/model/content/engines/VDSEngine.java deleted file mode 100644 index c3720d52511..00000000000 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/engines/VDSEngine.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.content.engines; - -import com.yahoo.vespa.config.storage.StorMemfilepersistenceConfig; -import com.yahoo.vespa.config.content.core.StorServerConfig; -import com.yahoo.vespa.model.builder.xml.dom.ModelElement; -import com.yahoo.vespa.model.content.StorageGroup; -import com.yahoo.vespa.model.content.StorageNode; -import com.yahoo.vespa.model.content.cluster.ContentCluster; - -/** - * Configuration class to generate config for the memfile engines provider. - */ -public class VDSEngine extends PersistenceEngine - implements StorMemfilepersistenceConfig.Producer -{ - ModelElement tuning; - - public VDSEngine(StorageNode parent, ModelElement vdsConfig) { - super(parent, "provider"); - - if (vdsConfig != null) { - this.tuning = vdsConfig.getChild("tuning"); - } - - if (parent != null) { - parent.useVdsEngine(); - } - } - - @Override - public void getConfig(StorMemfilepersistenceConfig.Builder builder) { - if (tuning == null) { - return; - } - - ModelElement diskFullRatio = tuning.getChild("disk-full-ratio"); - if (diskFullRatio != null) { - builder.disk_full_factor(diskFullRatio.asDouble()); - } - - ModelElement cacheSize = tuning.getChild("cache-size"); - if (cacheSize != null) { - builder.cache_size(cacheSize.asLong()); - } - } - - @Override - public void getConfig(StorServerConfig.Builder builder) { - builder.persistence_provider( - new StorServerConfig.Persistence_provider.Builder().type( - StorServerConfig.Persistence_provider.Type.Enum.STORAGE) - ); - } - - public static class Factory implements PersistenceFactory { - ModelElement vdsConfig; - - public Factory(ModelElement vdsConfig) { - this.vdsConfig = vdsConfig; - } - - @Override - public PersistenceEngine create(StorageNode storageNode, StorageGroup parentGroup, ModelElement storageNodeElement) { - return new VDSEngine(storageNode, vdsConfig); - } - - @Override - public boolean supportRevert() { - return true; - } - - @Override - public boolean enableMultiLevelSplitting() { - return true; - } - - @Override - public ContentCluster.DistributionMode getDefaultDistributionMode() { - return ContentCluster.DistributionMode.STRICT; - } - } -} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/IntegrityCheckerProducer.java b/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/IntegrityCheckerProducer.java index 7fa4211ade8..46d621981d4 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/IntegrityCheckerProducer.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/IntegrityCheckerProducer.java @@ -13,45 +13,7 @@ public class IntegrityCheckerProducer implements StorIntegritycheckerConfig.Prod public static class Builder { protected IntegrityCheckerProducer build(ContentCluster cluster, ModelElement clusterElem) { - if (!cluster.isMemfilePersistence()) { return integrityCheckerDisabled(); - } - - ModelElement tuning = clusterElem.getChild("tuning"); - - if (tuning == null) { - return new IntegrityCheckerProducer(); - } - - ModelElement maintenance = tuning.getChild("maintenance"); - if (maintenance == null) { - return new IntegrityCheckerProducer(); - } - - Integer startTime = null; - Integer stopTime = null; - String weeklyCycle = null; - - String start = maintenance.getStringAttribute("start"); - if (start != null) { - startTime = ConfigModelUtils.getTimeOfDay(start); - } - - String stop = maintenance.getStringAttribute("stop"); - if (stop != null) { - stopTime = ConfigModelUtils.getTimeOfDay(stop); - } - - String high = maintenance.getStringAttribute("high"); - - if (high != null) { - int weekday = ConfigModelUtils.getDayOfWeek(high); - char[] weeklycycle = "rrrrrrr".toCharArray(); - weeklycycle[weekday] = 'R'; - weeklyCycle = String.valueOf(weeklycycle); - } - - return new IntegrityCheckerProducer(startTime, stopTime, weeklyCycle); } } diff --git a/config-model/src/main/javacc/SDParser.jj b/config-model/src/main/javacc/SDParser.jj index 86b136a1dd2..0aff59d459f 100644 --- a/config-model/src/main/javacc/SDParser.jj +++ b/config-model/src/main/javacc/SDParser.jj @@ -1501,7 +1501,7 @@ void body(SDField field) : { } { <BODY> { - deployLogger.log(Level.WARNING, field + ": 'header/body' is deprecated and has no effect unless using deprecated vds engine."); + deployLogger.log(Level.WARNING, field + ": 'header/body' is deprecated and has no effect."); field.setHeader(false); field.setHeaderOrBodyDefined(true); } @@ -1516,7 +1516,7 @@ void header(SDField field) : { } { <HEADER> { - deployLogger.log(Level.WARNING, field + ": 'header/body' is deprecated and has no effect unless using deprecated vds engine."); + deployLogger.log(Level.WARNING, field + ": 'header/body' is deprecated and has no effect."); field.setHeader(true); field.setHeaderOrBodyDefined(true); } diff --git a/config-model/src/main/resources/schema/content.rnc b/config-model/src/main/resources/schema/content.rnc index 8121a85c056..58d22ea9b6f 100644 --- a/config-model/src/main/resources/schema/content.rnc +++ b/config-model/src/main/resources/schema/content.rnc @@ -157,11 +157,7 @@ DocumentProcessing = element document-processing { ## Config for the persistence providers. Engine = element engine { - (Vds | Proton | Dummy) -} - -Vds = element vds { - text + (Proton | Dummy) } Proton = element proton { @@ -375,3 +371,10 @@ TuningCompression = element compression { Experimental = element experimental { element enable-multiple-bucket-spaces { xsd:boolean }? } + +Thread = element thread { + ## The lowest priority this thread should handle. + attribute lowest-priority { xsd:string}? & + ## The number of threads of this type to create + attribute count { xsd:integer }? +} diff --git a/config-model/src/main/resources/schema/services.rnc b/config-model/src/main/resources/schema/services.rnc index c728dd017c8..3897448cb56 100644 --- a/config-model/src/main/resources/schema/services.rnc +++ b/config-model/src/main/resources/schema/services.rnc @@ -4,7 +4,6 @@ include "admin.rnc" include "clients.rnc" include "content.rnc" include "docproc.rnc" -include "storage.rnc" include "routing.rnc" include "containercluster.rnc" include "genericcluster.rnc" diff --git a/config-model/src/main/resources/schema/storage.rnc b/config-model/src/main/resources/schema/storage.rnc deleted file mode 100644 index 24a00cb9ecf..00000000000 --- a/config-model/src/main/resources/schema/storage.rnc +++ /dev/null @@ -1,237 +0,0 @@ -# Copyright 2017 Yahoo Holdings. 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" - -Storage = Storage30 - -# Specific v2.0 definitions - -Tuning20 = element tuning { - element cache { xsd:nonNegativeInteger }? & - element memorytouse { xsd:nonNegativeInteger }? & - element avgdiskspernode { xsd:nonNegativeInteger }? & - element avgmegabytesperdisk { xsd:nonNegativeInteger }? & - element avgdocsize { xsd:nonNegativeInteger }? -} - -Datadistribution = element datadistribution { - attribute disk { text }? & - element diskbalancer { - attribute start { xsd:string { pattern = "[0-9]{2}:[0-9]{2}" } } ? & - attribute stop { xsd:string { pattern = "[0-9]{2}:[0-9]{2}" } } ? & - attribute cycletime { xsd:string { pattern = "[0-9]{2}:[0-9]{2}" } } ? & - attribute targetskewpercent { xsd:double { minInclusive = "0" maxInclusive = "100"} }? & - attribute max-target-fill-rate-above-average { xsd:double { minInclusive = "-1" maxInclusive = "1"} }? & - attribute stopontarget { xsd:boolean }? - } ? -} - -OperationsLog20 = -## File name of file to log operations to. -[ a:defaultValue = "false" ] -element operationslog { xsd:boolean } - -Priority = element priority { - attribute from { xsd:string} & - attribute to { xsd:integer { minInclusive = "0" maxInclusive = "255" } } -} - -PriorityMapping = element prioritymapping { - Priority+ -} - -Thread = element thread { - ## The lowest priority this thread should handle. - attribute lowest-priority { xsd:string}? & - ## The number of threads of this type to create - attribute count { xsd:integer }? -} - -## Declare which storage threads each disk should have. -Threads = element diskthreads { - ## Operations with priority worse than this can be blocked - attribute highest-priority-to-block { xsd:string } ? & - ## Operations with priority better than this can block others - attribute lowest-priority-to-block-others { xsd:string } ? & - Thread+ -} - -Visitors = element visitors { - attribute threads { xsd:positiveInteger }? & - attribute maxqueuesize { xsd:positiveInteger }? & - element maxconcurrent { - attribute fixed { xsd:positiveInteger } & - attribute variable { xsd:nonNegativeInteger }? - }? -} - -ClusterParamsV30 = - ## Percentage of disk space storage will use storing documents. (Remaining used for resizing) - element diskfullpercentage { xsd:nonNegativeInteger { minInclusive = "1" maxInclusive = "99" } }? & - ## Whether to restart storage marking failed disks down - element faildiskonerror { xsd:boolean }? & - ## Time in seconds to keep all operations in case we need to revert them - element reverttimeperiod { xsd:nonNegativeInteger }? & - ## Time in seconds to keep remove statements for search/VDS recovery - element recoveryperiod { xsd:nonNegativeInteger }? & - ## Number of bits used for initial splitting. - element staticbucketbits { xsd:integer { minInclusive = "16" maxInclusive = "58" } }? & - ## Number of bytes per storage file. - element bucketsplitsize { xsd:positiveInteger }? & - ## Number of documents per storage file. - element bucketsplitcount { xsd:positiveInteger }? & - PriorityMapping? & - element deviceparams { - ## Timeout in seconds of a disk operation where storage assumes IO error (0 = never = default) - attribute diskoperationtimeout { xsd:nonNegativeInteger }? & - ## Not use O_DIRECT when reading from files - element cachedio { - ## Whether to sync after each VDS operation, default false - attribute fsync { xsd:boolean }? - }? & - ## Disk threads in storage - Threads? - }? & - GarbageCollect? & - DeadLockDetector? & - Visitors? - -FleetControllers = element fleetcontrollers { - attribute jvmargs { text }? & - FleetControllerStats.attlist & - FleetController20+ -} - -FleetController20 = element fleetcontroller { - service.attlist & - attribute index { xsd:nonNegativeInteger } -} - -# Common definitions for v2.0 and v3.0 - -StorageMetrics = element metrics { element log { text }* } - -Disk = element disk { - attribute index { xsd:nonNegativeInteger } & - attribute capacity { xsd:double { minExclusive = "0.0" } }? -} - -GarbageCollect = element garbagecollect { - attribute start { xsd:string { pattern = "[0-9]{2}:[0-9]{2}" } }, - attribute stop { xsd:string { pattern = "[0-9]{2}:[0-9]{2}" } }, - attribute full { string "monday" | string "tuesday" | string "wednesday" | - string "thursday" | string "friday" | string "saturday" | string "sunday" } -} - -DeadLockDetector = element deadlockdetector { - attribute enable { xsd:boolean } ? & - attribute slack-time-period { xsd:double { minInclusive = "0.0" } }? -} - -FleetController = element fleetcontroller { - service.attlist & - FleetControllerStats.attlist & - attribute index { xsd:nonNegativeInteger } ? -} - -FleetControllerStats.attlist = - attribute initprogresstime { xsd:double { minExclusive = "0.0" } } ? & - attribute transitiontime { xsd:double { minInclusive = "0.0" } } ? & - attribute mintimebeforesettingoutofreachnodedown { xsd:double { minExclusive = "0.0" } } ? & - attribute maxprematurecrashes { xsd:nonNegativeInteger } ? & - attribute stablestateperiod { xsd:double { minExclusive = "0.0" } } ? & - attribute mindistributorupcount { xsd:nonNegativeInteger } ? & - attribute mindistributorupratio { - xsd:double { minInclusive = "0.0" maxInclusive = "1.0" } } ? & - attribute minstorageupcount { xsd:nonNegativeInteger } ? & - attribute minstorageupratio { - xsd:double { minInclusive = "0.0" maxInclusive = "1.0" } } ? & - attribute mintimebetweenclusterstates { - xsd:double { minInclusive = "0.0" } } ? - -# v3.0 definitions -Storage30 = element storage { - attribute version { string "3.0" } & - GenericConfig* & - element cluster { - # name defaults to 'storage' - attribute name { xsd:NCName { minLength = "1" } }? & - ## Redundancy level - how many copies of each document are made. - attribute redundancy { xsd:positiveInteger }? & - attribute initial-redundancy { xsd:positiveInteger }? & - attribute ensure-primary-persisted { xsd:boolean }? & - attribute distributionbits { xsd:positiveInteger } ? & - attribute distributorbaseport { xsd:unsignedShort }? & - element forwarding { xsd:string }? & - GenericConfig* & - ( FleetController | FleetControllers ) & - ClusterParamsV30? & - StorageMetrics? & - OperationsLog20? & - Tuning20? & - Merges? & - Datadistribution? & - TopStorageGroup - }+ -} - -TopStorageGroup = element group { - attribute index { xsd:nonNegativeInteger }? & - attribute name { xsd:string }? & - element disks { - attribute num { xsd:nonNegativeInteger } & - attribute size { xsd:string } & - attribute iomodel {xsd:string } & - element disk { - attribute index { xsd:nonNegativeInteger } & - attribute size { xsd:string } - } * - } ? & - ( - ( - element distribution { - attribute partitions { xsd:string } - } & - StorageGroup+ - ) | - element node { - service.attlist & - attribute distributorbaseport { xsd:unsignedShort }? & - attribute index { xsd:nonNegativeInteger } & - attribute capacity { xsd:double { minExclusive = "0.0" } }? - } + - ) - } - -StorageGroup = element group { - attribute index { xsd:nonNegativeInteger } & - attribute name { xsd:string } & - element disks { - attribute num { xsd:nonNegativeInteger } & - attribute size { xsd:string } & - attribute iomodel {xsd:string } & - element disk { - attribute index { xsd:nonNegativeInteger } & - attribute size { xsd:string } - } * - } ? & - ( - ( - element distribution { - attribute partitions { xsd:string } - } & - StorageGroup+ - ) | - element node { - service.attlist & - attribute distributorbaseport { xsd:unsignedShort }? & - attribute index { xsd:nonNegativeInteger } & - attribute capacity { xsd:double { minExclusive = "0.0" } }? - } + - ) - } - -Merges = element merges { - attribute maxpernode { xsd:positiveInteger }? & - attribute maxqueuesize { xsd:nonNegativeInteger }? -} diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexingModeChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexingModeChangeValidatorTest.java index a0674e37181..e9979119d84 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexingModeChangeValidatorTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexingModeChangeValidatorTest.java @@ -50,9 +50,6 @@ public class IndexingModeChangeValidatorTest { return "<services version='1.0'>" + " <content id='default' version='1.0'>" + " <redundancy>1</redundancy>" + - " <engine>" + - (indexingMode.equals(AbstractSearchCluster.IndexingMode.REALTIME) ? " <proton/>" : " <vds/>") + - " </engine>" + " <documents>" + " <document type='music' mode='" + (indexingMode.equals(AbstractSearchCluster.IndexingMode.REALTIME) ? "index" : "streaming") + "'/>" + diff --git a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java index eb51d88c7b5..cc17c46146f 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java @@ -20,7 +20,6 @@ import com.yahoo.vespa.model.VespaModel; import com.yahoo.vespa.model.content.ContentSearchCluster; import com.yahoo.vespa.model.content.cluster.ContentCluster; import com.yahoo.vespa.model.content.engines.ProtonEngine; -import com.yahoo.vespa.model.content.engines.VDSEngine; import com.yahoo.vespa.model.search.*; import com.yahoo.vespa.model.test.utils.VespaModelCreatorWithMockPkg; @@ -194,9 +193,6 @@ public class ContentBuilderTest extends DomBuilderTest { " <documents>" + " <document type=\"music\" mode=\"store-only\"/>" + " </documents>" + - " <engine>"+ - " <vds/>"+ - " </engine>"+ " <group>"+ " <node hostalias=\"mockhost\" distribution-key=\"0\"/>"+ " </group>"+ @@ -206,7 +202,7 @@ public class ContentBuilderTest extends DomBuilderTest { assertFalse(s.hasIndexedCluster()); assertTrue(s.getClusters().isEmpty()); - assertTrue(a.getPersistence() instanceof VDSEngine.Factory); + assertTrue(a.getPersistence() instanceof ProtonEngine.Factory); assertEquals(1, a.getStorageNodes().getChildren().size()); } @@ -244,9 +240,6 @@ public class ContentBuilderTest extends DomBuilderTest { " <documents>" + " <document type=\"music\" mode=\"store-only\"/>" + " </documents>" + - " <engine>"+ - " <vds/>"+ - " </engine>"+ " <group>"+ " <node hostalias=\"mockhost\" distribution-key=\"0\"/>"+ " </group>"+ @@ -263,7 +256,7 @@ public class ContentBuilderTest extends DomBuilderTest { assertEquals(1, a.getRootGroup().getNodes().size()); assertEquals("node0", a.getRootGroup().getNodes().get(0).getHostName()); - assertTrue(a.getPersistence() instanceof VDSEngine.Factory); + assertTrue(a.getPersistence() instanceof ProtonEngine.Factory); assertEquals(1, a.getStorageNodes().getChildren().size()); assertEquals("a", a.getConfigId()); } @@ -331,9 +324,6 @@ public class ContentBuilderTest extends DomBuilderTest { " <documents>"+ " <document type='music' mode='streaming'/>"+ " </documents>"+ - " <engine>"+ - " <vds/>"+ - " </engine>"+ " <group>"+ " <node hostalias=\"mockhost\" distribution-key=\"0\"/>"+ " </group>"+ @@ -348,7 +338,7 @@ public class ContentBuilderTest extends DomBuilderTest { assertEquals(musicClusterId + ".music", sc.getClusterName()); assertEquals(musicClusterId, ((StreamingSearchCluster)sc).getStorageRouteSpec()); - assertTrue(cluster.getPersistence() instanceof VDSEngine.Factory); + assertTrue(cluster.getPersistence() instanceof ProtonEngine.Factory); assertEquals(1, cluster.getStorageNodes().getChildren().size()); assertEquals(musicClusterId, cluster.getConfigId()); @@ -360,7 +350,7 @@ public class ContentBuilderTest extends DomBuilderTest { "logd", "configproxy", "config-sentinel", "configserver", "logserver", "slobrok", "container-clustercontroller", - "storagenode", "distributor" + "storagenode", "distributor","searchnode","transactionlogserver" }; assertServices(h, expectedServices); @@ -386,9 +376,6 @@ public class ContentBuilderTest extends DomBuilderTest { " <document type='music' mode='streaming'/>"+ " <document type='book' mode='streaming'/>"+ " </documents>"+ - " <engine>"+ - " <vds/>"+ - " </engine>"+ " <group>"+ " <node hostalias=\"mockhost\" distribution-key=\"0\"/>"+ " </group>"+ @@ -412,7 +399,7 @@ public class ContentBuilderTest extends DomBuilderTest { assertEquals(musicClusterId, ((StreamingSearchCluster) sc).getStorageRouteSpec()); } - assertTrue(cluster.getPersistence() instanceof VDSEngine.Factory); + assertTrue(cluster.getPersistence() instanceof ProtonEngine.Factory); assertEquals(1, cluster.getStorageNodes().getChildren().size()); assertEquals(musicClusterId, cluster.getConfigId()); diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/ClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/ClusterTest.java index 7ece950b383..1c8f572ce8d 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/ClusterTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/ClusterTest.java @@ -603,7 +603,6 @@ public class ClusterTest extends ContentBaseTest { @Test public void testProviders() { testProvider("proton", StorServerConfig.Persistence_provider.Type.RPC); - testProvider("vds", StorServerConfig.Persistence_provider.Type.STORAGE); testProvider("dummy", StorServerConfig.Persistence_provider.Type.DUMMY); } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/DistributorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/DistributorTest.java index 48b7ccdad6b..bdb64877fea 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/DistributorTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/DistributorTest.java @@ -54,31 +54,15 @@ public class DistributorTest { @Test public void testRevertDefaultOffForSearch() { - { - StorDistributormanagerConfig.Builder builder = new StorDistributormanagerConfig.Builder(); - parse("<cluster id=\"storage\">\n" + - " <documents/>" + - " <engine>" + - " <vds/>" + - " </engine>" + - " <group>" + - " <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + - " </group>" + - "</cluster>").getConfig(builder); - StorDistributormanagerConfig conf = new StorDistributormanagerConfig(builder); - assertEquals(true, conf.enable_revert()); - } - { - StorDistributormanagerConfig.Builder builder = new StorDistributormanagerConfig.Builder(); - parse("<cluster id=\"storage\">\n" + - " <documents/>" + - " <group>" + - " <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + - " </group>" + - "</cluster>").getConfig(builder); - StorDistributormanagerConfig conf = new StorDistributormanagerConfig(builder); - assertEquals(false, conf.enable_revert()); - } + StorDistributormanagerConfig.Builder builder = new StorDistributormanagerConfig.Builder(); + parse("<cluster id=\"storage\">\n" + + " <documents/>" + + " <group>" + + " <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + + " </group>" + + "</cluster>").getConfig(builder); + StorDistributormanagerConfig conf = new StorDistributormanagerConfig(builder); + assertEquals(false, conf.enable_revert()); } @Test @@ -104,7 +88,7 @@ public class DistributorTest { assertEquals(26214400, conf.splitsize()); assertEquals(13107200, conf.joinsize()); assertEquals(8, conf.minsplitcount()); - assertEquals(true, conf.inlinebucketsplitting()); + assertEquals(false, conf.inlinebucketsplitting()); } @Test diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/GenericConfigTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/GenericConfigTest.java index 42c286f3790..75ddd8173c3 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/GenericConfigTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/GenericConfigTest.java @@ -48,9 +48,6 @@ public class GenericConfigTest { " <group>" + " <node distribution-key='0' hostalias='node0'/>" + " </group>" + - " <engine>" + - " <vds/>" + - " </engine>" + " </content>" + "</services>"; } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java index 95da1516e80..d52b07a318a 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java @@ -102,9 +102,6 @@ public class StorageClusterTest { parse( "<cluster id=\"bees\">\n" + " <documents/>" + - " <engine>" + - " <vds/>" + - " </engine>" + " <tuning>\n" + " <persistence-threads>\n" + " <thread lowest-priority=\"VERY_LOW\" count=\"2\"/>\n" + @@ -121,7 +118,7 @@ public class StorageClusterTest { StorFilestorConfig config = new StorFilestorConfig(builder); assertEquals(4, config.num_threads()); - assertEquals(true, config.enable_multibit_split_optimalization()); + assertEquals(false, config.enable_multibit_split_optimalization()); } @Test @@ -144,30 +141,6 @@ public class StorageClusterTest { } @Test - public void maintenance_tuning_is_honored_for_vds_provider() throws Exception { - StorIntegritycheckerConfig.Builder builder = new StorIntegritycheckerConfig.Builder(); - parse( - "<cluster id=\"bees\">\n" + - " <documents/>" + - " <engine>\n" + - " <vds/>\n" + - " </engine>\n" + - " <tuning>" + - " <maintenance start=\"01:00\" stop=\"02:00\" high=\"tuesday\"/>\n" + - " </tuning>" + - " <group>" + - " <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + - " </group>" + - "</cluster>" - ).getConfig(builder); - StorIntegritycheckerConfig config = new StorIntegritycheckerConfig(builder); - - assertEquals(60, config.dailycyclestart()); - assertEquals(120, config.dailycyclestop()); - assertEquals("rrRrrrr", config.weeklycycle()); - } - - @Test public void integrity_checker_explicitly_disabled_when_not_running_with_vds_provider() throws Exception { StorIntegritycheckerConfig.Builder builder = new StorIntegritycheckerConfig.Builder(); parse( @@ -184,26 +157,6 @@ public class StorageClusterTest { } @Test - public void integrity_checker_not_explicitly_disabled_when_running_with_vds_provider() throws Exception { - StorIntegritycheckerConfig.Builder builder = new StorIntegritycheckerConfig.Builder(); - parse( - "<cluster id=\"bees\">\n" + - " <documents/>" + - " <engine>\n" + - " <vds/>\n" + - " </engine>\n" + - " <group>" + - " <node distribution-key=\"0\" hostalias=\"mockhost\"/>" + - " </group>" + - "</cluster>" - ).getConfig(builder); - StorIntegritycheckerConfig config = new StorIntegritycheckerConfig(builder); - // No tuning element has been provided, but we should still get a default weeklycycle - // config generated since we're on VDS. - assertEquals("Rrrrrrr", config.weeklycycle()); - } - - @Test public void testCapacity() throws Exception { String xml = "<cluster id=\"storage\">\n" + diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/StorageNodeTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/StorageNodeTest.java deleted file mode 100644 index 2245f2e7ed9..00000000000 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/StorageNodeTest.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.content; - -import com.yahoo.config.application.api.ApplicationPackage; -import com.yahoo.config.model.deploy.DeployProperties; -import com.yahoo.config.model.deploy.DeployState; -import com.yahoo.config.model.provision.InMemoryProvisioner; -import com.yahoo.config.model.test.MockApplicationPackage; -import com.yahoo.vespa.config.storage.StorDevicesConfig; -import com.yahoo.vespa.defaults.Defaults; -import com.yahoo.vespa.model.VespaModel; -import com.yahoo.vespa.model.test.utils.ApplicationPackageUtils; -import com.yahoo.vespa.model.test.utils.VespaModelCreatorWithMockPkg; -import org.junit.Test; - -import java.util.List; - -import static org.junit.Assert.assertEquals; - -/** - * @author hakonhall - */ -public class StorageNodeTest { - - private StorDevicesConfig getConfig(boolean useVdsEngine) { - String vdsConfig = useVdsEngine ? " <engine>" + - " <vds/>" + - " </engine>" : ""; - - String servicesXml = "<?xml version='1.0' encoding='utf-8' ?>" + - "<services version='1.0'>" + - " <admin version='2.0'>" + - " <adminserver hostalias='node0'/>" + - " </admin>" + - " <content version='1.0' id='zoo'>" + - " <redundancy>1</redundancy>" + - " <nodes count='1' />" + - " <documents>" + - " <document type='type1' mode='streaming' />" + - " </documents>" + - vdsConfig + - " </content>" + - "</services>"; - List<String> searchDefinitions = ApplicationPackageUtils.generateSearchDefinition("type1"); - VespaModelCreatorWithMockPkg modelCreator = - new VespaModelCreatorWithMockPkg(null, servicesXml, searchDefinitions); - ApplicationPackage appPkg = modelCreator.appPkg; - boolean failOnOutOfCapacity = true; - InMemoryProvisioner provisioner = - new InMemoryProvisioner(failOnOutOfCapacity, "host1.yahoo.com", "host2.yahoo.com"); - DeployProperties.Builder builder = new DeployProperties.Builder(); - DeployProperties properties = builder.hostedVespa(true).build(); - DeployState deployState = new DeployState.Builder() - .applicationPackage(appPkg) - .modelHostProvisioner(provisioner) - .properties(properties) - .build(true); - VespaModel model = modelCreator.create(true, deployState); - return model.getConfig(StorDevicesConfig.class, "zoo/storage/0"); - } - - @Test - public void verifyDiskPathConfigIsSetForVds() { - StorDevicesConfig config = getConfig(true); - assertEquals(1, config.disk_path().size()); - assertEquals(Defaults.getDefaults().underVespaHome("var/db/vespa/vds/zoo/storage/0/disks/d0"), config.disk_path(0)); - } - - @Test - public void verifyDiskPathConfigIsNotSetForNonHosted() { - StorDevicesConfig config = getConfig(false); - assertEquals(0, config.disk_path().size()); - } - -} diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/VDSProviderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/VDSProviderTest.java deleted file mode 100644 index c2cf3886564..00000000000 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/VDSProviderTest.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.content; - -import com.yahoo.vespa.config.storage.StorMemfilepersistenceConfig; -import com.yahoo.text.XML; -import com.yahoo.vespa.model.builder.xml.dom.ModelElement; -import com.yahoo.vespa.model.content.engines.VDSEngine; -import org.junit.Ignore; -import org.junit.Test; -import org.w3c.dom.Document; - -import static org.junit.Assert.assertEquals; - -public class VDSProviderTest { - VDSEngine parse(String xml) { - Document doc = XML.getDocument(xml); - return new VDSEngine(null, new ModelElement(doc.getDocumentElement())); - } - - @Test - public void testTuning() { - StorMemfilepersistenceConfig.Builder builder = new StorMemfilepersistenceConfig.Builder(); - - parse( - " <vds>\n" + - " <tuning>\n" + - " <disk-full-ratio>0.93</disk-full-ratio>\n" + - " <cache-size>1G</cache-size>\n" + - " </tuning>" + - "</vds>" - ).getConfig(builder); - - StorMemfilepersistenceConfig config = new StorMemfilepersistenceConfig(builder); - - assertEquals(0.93, config.disk_full_factor(), 0.01); - assertEquals(1024 * 1024 * 1024, config.cache_size()); - } -} |