summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@yahooinc.com>2023-10-29 14:58:10 +0100
committerHåkon Hallingstad <hakon@yahooinc.com>2023-10-29 14:58:10 +0100
commitba350534b72287a73bff3b026cf41c32118f10ea (patch)
tree0749daeeecefeac267a125c88fde3018a456ab1f
parentf9076902965b87a25827a41925edda9b9e728f77 (diff)
Default cluster capacity count to 1
-rw-r--r--flags/src/main/java/com/yahoo/vespa/flags/custom/ClusterCapacity.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/flags/src/main/java/com/yahoo/vespa/flags/custom/ClusterCapacity.java b/flags/src/main/java/com/yahoo/vespa/flags/custom/ClusterCapacity.java
index 8ac83f2b2aa..4502bdf3f73 100644
--- a/flags/src/main/java/com/yahoo/vespa/flags/custom/ClusterCapacity.java
+++ b/flags/src/main/java/com/yahoo/vespa/flags/custom/ClusterCapacity.java
@@ -35,7 +35,7 @@ public class ClusterCapacity {
private final String clusterType;
@JsonCreator
- public ClusterCapacity(@JsonProperty("count") int count,
+ public ClusterCapacity(@JsonProperty("count") Integer count,
@JsonProperty("vcpu") Double vcpu,
@JsonProperty("memoryGb") Double memoryGb,
@JsonProperty("diskGb") Double diskGb,
@@ -44,7 +44,7 @@ public class ClusterCapacity {
@JsonProperty("storageType") String storageType,
@JsonProperty("architecture") String architecture,
@JsonProperty("clusterType") String clusterType) {
- this.count = (int) requireNonNegative("count", count);
+ this.count = count == null ? 1 : (int) requireNonNegative("count", count);
this.vcpu = vcpu == null ? OptionalDouble.empty() : OptionalDouble.of(requireNonNegative("vcpu", vcpu));
this.memoryGb = memoryGb == null ? OptionalDouble.empty() : OptionalDouble.of(requireNonNegative("memoryGb", memoryGb));
this.diskGb = diskGb == null ? OptionalDouble.empty() : OptionalDouble.of(requireNonNegative("diskGb", diskGb));