diff options
author | Harald Musum <musum@yahoo-inc.com> | 2018-02-15 15:25:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-15 15:25:17 +0100 |
commit | ff8eab557d523981add40e4ff642c06bb3524016 (patch) | |
tree | bae2ea59f83dd8cefd0dab67fe75340dc7f9c424 | |
parent | 55c7376e90021d181eac71fa229b967825bdb49d (diff) | |
parent | 49e720d867f99f22e4a72e9fd7f48c5a8186912f (diff) |
Merge pull request #4990 from vespa-engine/balder/remove-filedistribution-config
Remove unused code.
4 files changed, 0 insertions, 69 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/FileDistributionOptions.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/FileDistributionOptions.java deleted file mode 100644 index 22855709208..00000000000 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/FileDistributionOptions.java +++ /dev/null @@ -1,56 +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.admin; - -import com.yahoo.binaryprefix.BinaryPrefix; -import com.yahoo.binaryprefix.BinaryScaledAmount; -import com.yahoo.cloud.config.filedistribution.FiledistributorConfig; - -/** - * Options for controlling the behavior of the file distribution services. - * - * @author tonytv - */ -public class FileDistributionOptions implements FiledistributorConfig.Producer { - - private FileDistributionOptions() { - } - - private BinaryScaledAmount uploadBitRate = new BinaryScaledAmount(); - private BinaryScaledAmount downloadBitRate = new BinaryScaledAmount(); - private boolean disableFiledistributor = false; - - - public void downloadBitRate(BinaryScaledAmount amount) { - ensureNonNegative(amount); - downloadBitRate = amount; - } - - public void uploadBitRate(BinaryScaledAmount amount) { - ensureNonNegative(amount); - uploadBitRate = amount; - } - - public void disableFiledistributor(boolean value) { - disableFiledistributor = value; - } - - public boolean disableFiledistributor() { - return disableFiledistributor; - } - - private void ensureNonNegative(BinaryScaledAmount amount) { - if (amount.amount < 0) - throw new IllegalArgumentException("Expected non-negative number, got " + amount.amount); - } - - private int byteRate(BinaryScaledAmount bitRate) { - BinaryScaledAmount byteRate = bitRate.divide(8); - return (int) byteRate.as(BinaryPrefix.unit); - } - - @Override - public void getConfig(FiledistributorConfig.Builder builder) { - builder.maxuploadspeed((double) byteRate(uploadBitRate)); - builder.maxdownloadspeed((double) byteRate(downloadBitRate)); - } -} diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java b/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java index 1373acdf5d2..7acc1fb3069 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java @@ -12,7 +12,6 @@ import com.yahoo.config.model.test.MockApplicationPackage; import com.yahoo.config.model.test.MockRoot; import com.yahoo.text.XML; import com.yahoo.vespa.model.admin.Admin; -import com.yahoo.vespa.model.admin.FileDistributionOptions; import com.yahoo.vespa.model.admin.monitoring.DefaultMonitoring; import com.yahoo.vespa.model.admin.monitoring.builder.Metrics; import com.yahoo.vespa.model.content.cluster.ContentCluster; diff --git a/configdefinitions/src/vespa/CMakeLists.txt b/configdefinitions/src/vespa/CMakeLists.txt index 65b02d7dc05..e1e7a5a0c18 100644 --- a/configdefinitions/src/vespa/CMakeLists.txt +++ b/configdefinitions/src/vespa/CMakeLists.txt @@ -16,8 +16,6 @@ vespa_generate_config(configdefinitions configserver.def) install_config_definition(configserver.def cloud.config.configserver.def) vespa_generate_config(configdefinitions dispatch.def) install_config_definition(dispatch.def vespa.config.search.dispatch.def) -vespa_generate_config(configdefinitions filedistributor.def) -install_config_definition(filedistributor.def cloud.config.filedistribution.filedistributor.def) vespa_generate_config(configdefinitions filereferences.def) install_config_definition(filereferences.def cloud.config.filedistribution.filereferences.def) vespa_generate_config(configdefinitions fleetcontroller.def) diff --git a/configdefinitions/src/vespa/filedistributor.def b/configdefinitions/src/vespa/filedistributor.def deleted file mode 100644 index 13dd373eac6..00000000000 --- a/configdefinitions/src/vespa/filedistributor.def +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -namespace=cloud.config.filedistribution - -torrentport int -stateport int default = 0 -hostname string -filedbpath string - -maxdownloadspeed double -maxuploadspeed double |