diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-08-30 00:42:38 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-08-30 00:42:38 +0200 |
commit | 42cff562f49f3f6c45d91b34c36c4a99d23ecc32 (patch) | |
tree | 179a90a59b494da2534f5263bcf4bb6730860b49 /config-model | |
parent | 48b301ecfa411302d486b86211496e7ebb15e986 (diff) |
GC stor-integritychecker config
Diffstat (limited to 'config-model')
3 files changed, 0 insertions, 70 deletions
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 deleted file mode 100644 index 4f81bbf165f..00000000000 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/IntegrityCheckerProducer.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.content.storagecluster; - -import com.yahoo.vespa.config.content.core.StorIntegritycheckerConfig; -import com.yahoo.vespa.model.builder.xml.dom.ModelElement; -import com.yahoo.vespa.model.content.cluster.ContentCluster; - -/** - * Serves stor-integritychecker config for storage clusters. - */ -public class IntegrityCheckerProducer implements StorIntegritycheckerConfig.Producer { - - public static class Builder { - protected IntegrityCheckerProducer build(ContentCluster cluster, ModelElement clusterElem) { - return integrityCheckerDisabled(); - } - } - - private final Integer startTime; - private final Integer stopTime; - private final String weeklyCycle; - - IntegrityCheckerProducer(Integer startTime, Integer stopTime, String weeklyCycle) { - this.startTime = startTime; - this.stopTime = stopTime; - this.weeklyCycle = weeklyCycle; - } - - private static IntegrityCheckerProducer integrityCheckerDisabled() { - // Leave start/start times at default, but mark each day of the week as - // not allowing the integrity checker to be run. - return new IntegrityCheckerProducer(null, null, "-------"); - } - - @Override - public void getConfig(StorIntegritycheckerConfig.Builder builder) { - if (startTime != null) { - builder.dailycyclestart(startTime); - } - - if (stopTime != null) { - builder.dailycyclestop(stopTime); - } - - if (weeklyCycle != null) { - builder.weeklycycle(weeklyCycle); - } - } -} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorageCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorageCluster.java index 28698c2f0ce..872fda9d909 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorageCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/storagecluster/StorageCluster.java @@ -3,7 +3,6 @@ package com.yahoo.vespa.model.content.storagecluster; import ai.vespa.metrics.StorageMetrics; import com.yahoo.config.model.deploy.DeployState; -import com.yahoo.vespa.config.content.core.StorIntegritycheckerConfig; import com.yahoo.vespa.config.content.core.StorVisitorConfig; import com.yahoo.vespa.config.content.StorFilestorConfig; import com.yahoo.vespa.config.content.core.StorServerConfig; @@ -22,7 +21,6 @@ import org.w3c.dom.Element; */ public class StorageCluster extends TreeConfigProducer<StorageNode> implements StorServerConfig.Producer, - StorIntegritycheckerConfig.Producer, StorFilestorConfig.Producer, StorVisitorConfig.Producer, PersistenceConfig.Producer, @@ -37,7 +35,6 @@ public class StorageCluster extends TreeConfigProducer<StorageNode> return new StorageCluster(ancestor, ContentCluster.getClusterId(clusterElem), new FileStorProducer.Builder().build(deployState.getProperties(), cluster, clusterElem), - new IntegrityCheckerProducer.Builder().build(cluster, clusterElem), new StorServerProducer.Builder().build(clusterElem), new StorVisitorProducer.Builder().build(clusterElem), new PersistenceProducer.Builder().build(clusterElem)); @@ -46,7 +43,6 @@ public class StorageCluster extends TreeConfigProducer<StorageNode> private final String clusterName; private final FileStorProducer fileStorProducer; - private final IntegrityCheckerProducer integrityCheckerProducer; private final StorServerProducer storServerProducer; private final StorVisitorProducer storVisitorProducer; private final PersistenceProducer persistenceProducer; @@ -54,14 +50,12 @@ public class StorageCluster extends TreeConfigProducer<StorageNode> StorageCluster(TreeConfigProducer<?> parent, String clusterName, FileStorProducer fileStorProducer, - IntegrityCheckerProducer integrityCheckerProducer, StorServerProducer storServerProducer, StorVisitorProducer storVisitorProducer, PersistenceProducer persistenceProducer) { super(parent, "storage"); this.clusterName = clusterName; this.fileStorProducer = fileStorProducer; - this.integrityCheckerProducer = integrityCheckerProducer; this.storServerProducer = storServerProducer; this.storVisitorProducer = storVisitorProducer; this.persistenceProducer = persistenceProducer; @@ -95,11 +89,6 @@ public class StorageCluster extends TreeConfigProducer<StorageNode> } @Override - public void getConfig(StorIntegritycheckerConfig.Builder builder) { - integrityCheckerProducer.getConfig(builder); - } - - @Override public void getConfig(StorServerConfig.Builder builder) { storServerProducer.getConfig(builder); } 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 540f625cf2b..2404c6399eb 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 @@ -9,7 +9,6 @@ import com.yahoo.config.model.test.MockApplicationPackage; import com.yahoo.config.provision.Flavor; import com.yahoo.config.provisioning.FlavorsConfig; import com.yahoo.vespa.config.content.core.StorCommunicationmanagerConfig; -import com.yahoo.vespa.config.content.core.StorIntegritycheckerConfig; import com.yahoo.vespa.config.content.core.StorVisitorConfig; import com.yahoo.vespa.config.content.StorFilestorConfig; import com.yahoo.vespa.config.content.core.StorServerConfig; @@ -327,15 +326,6 @@ public class StorageClusterTest { } @Test - void integrity_checker_explicitly_disabled_when_not_running_with_vds_provider() { - StorIntegritycheckerConfig.Builder builder = new StorIntegritycheckerConfig.Builder(); - parse(cluster("bees", "")).getConfig(builder); - StorIntegritycheckerConfig config = new StorIntegritycheckerConfig(builder); - // '-' --> don't run on the given week day - assertEquals("-------", config.weeklycycle()); - } - - @Test void testCapacity() { String xml = joinLines( "<cluster id=\"storage\">", |