summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/admin/FileDistributionOptions.java56
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java1
-rw-r--r--configdefinitions/src/vespa/filedistributor.def10
3 files changed, 0 insertions, 67 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/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