diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-09-30 15:02:11 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-09-30 15:02:11 +0200 |
commit | 9bd1863148bc72cc85b5bfd04fa5ba1027c24171 (patch) | |
tree | 07f2695ad25de716fba478ff4e97c55a44c29ddb /config-model/src | |
parent | a30849486a1a6e4639193297b6972457ff242a89 (diff) |
Discourage usage of vcpu() in config model
Diffstat (limited to 'config-model/src')
3 files changed, 7 insertions, 1 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java index f5b168958c0..c715081329a 100755 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java @@ -652,7 +652,11 @@ public abstract class ContainerCluster<CONTAINER extends Container> public boolean getDeferChangesUntilRestart() { return deferChangesUntilRestart; } - /** Effective vcpu for the containers in cluster. Use this value as scale factor for performance/resource tuning. **/ + /** + * Effective vcpu for the containers in cluster. Use this value as scale factor for performance/resource tuning. + * @deprecated Use {@link Runtime#availableProcessors()} directly on receiver of config instead. + **/ + @Deprecated(forRemoval = true) public OptionalDouble vcpu() { return getContainers().stream() .filter(c -> c.getHostResource() != null && c.getHostResource().realResources() != null) diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java b/config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java index fc41da43479..88aaf78ccec 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java @@ -69,6 +69,7 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL throw new RuntimeException("File name pattern required when configuring access log."); } + @SuppressWarnings("removal") private static OptionalInt queueSize(ContainerCluster<?> cluster) { if (cluster == null) return OptionalInt.empty(); double vcpu = cluster.vcpu().orElse(0); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/component/ConnectionLogComponent.java b/config-model/src/main/java/com/yahoo/vespa/model/container/component/ConnectionLogComponent.java index 0b51cd163a2..ec3a4d0834a 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/component/ConnectionLogComponent.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/component/ConnectionLogComponent.java @@ -25,6 +25,7 @@ public class ConnectionLogComponent extends SimpleComponent implements Connectio this.queueSize = queueSize(cluster).orElse(-1); } + @SuppressWarnings("removal") private static OptionalInt queueSize(ContainerCluster<?> cluster) { if (cluster == null) return OptionalInt.empty(); double vcpu = cluster.vcpu().orElse(0); |