From 662bc93148ccb8f472bcd337ceb99fcb129d1493 Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Wed, 23 Feb 2022 12:23:19 +0100 Subject: Fix spelling (bandwith -> bandwidth) Note: Not defined in schema and not used in any app --- TODO.md | 4 ++-- .../yahoo/vespa/model/builder/xml/dom/NodesSpecification.java | 10 ++++------ .../main/java/com/yahoo/config/provision/NodeResources.java | 2 +- .../java/com/yahoo/config/provision/NodeResourcesTest.java | 8 ++++---- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/TODO.md b/TODO.md index 95be9a0b056..9fbb715ad91 100644 --- a/TODO.md +++ b/TODO.md @@ -63,7 +63,7 @@ However, maps cannot be indexed as text-search disk indexes. Vespa instances distribute data automatically within clusters, but these clusters are meant to consist of co-located machines - the distribution algorithm is not suitable for global distribution across datacenters because it cannot -seamlessly tolerate datacenter-wide outages and does not attempt to minimize bandwith usage between datacenters. +seamlessly tolerate datacenter-wide outages and does not attempt to minimize bandwidth usage between datacenters. Application usually achieve global precense instead by setting up multiple independent instances in different datacenters and write to all in parallel. This is robust and works well on average, but puts additional burden on applications to achieve cross-datacenter data consistency on datacenter failures, and does not enable automatic @@ -93,7 +93,7 @@ These use cases require support for global tensors (tensors available locally on but not sent with the query or residing in documents) which are not configured as part of the application package but which are written independently and dynamically updateable at a high write rate. To support this at large scale, with a high write rate, we need a small cluster of nodes storing the source of truth of the global tensor and which have -perfect consistency. This in turn must push updates to all content nodes in a best effort fashion given a fixed bandwith +perfect consistency. This in turn must push updates to all content nodes in a best effort fashion given a fixed bandwidth budget, such that query execution and document write traffic is prioritized over ensuring perfect consistency of global model updates. diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java index 5ad7fb84bb5..53224894bb5 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java @@ -20,10 +20,8 @@ import org.w3c.dom.Node; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Optional; import java.util.function.Function; -import java.util.stream.Collectors; import static java.util.stream.Collectors.toList; @@ -73,7 +71,7 @@ public class NodesSpecification { throw new IllegalArgumentException("Min and max resources must have the same non-numeric settings, but " + "min is " + min + " and max " + max); if (min.nodeResources().bandwidthGbps() != max.nodeResources().bandwidthGbps()) - throw new IllegalArgumentException("Min and max resources must have the same bandwith, but " + + throw new IllegalArgumentException("Min and max resources must have the same bandwidth, but " + "min is " + min + " and max " + max); this.min = min; @@ -262,12 +260,12 @@ public class NodesSpecification { Pair vcpu = toRange(element.requiredStringAttribute("vcpu"), .0, Double::parseDouble); Pair memory = toRange(element.requiredStringAttribute("memory"), .0, s -> parseGbAmount(s, "B")); Pair disk = toRange(element.requiredStringAttribute("disk"), .0, s -> parseGbAmount(s, "B")); - Pair bandwith = toRange(element.stringAttribute("bandwith"), .3, s -> parseGbAmount(s, "BPS")); + Pair bandwidth = toRange(element.stringAttribute("bandwidth"), .3, s -> parseGbAmount(s, "BPS")); NodeResources.DiskSpeed diskSpeed = parseOptionalDiskSpeed(element.stringAttribute("disk-speed")); NodeResources.StorageType storageType = parseOptionalStorageType(element.stringAttribute("storage-type")); - var min = new NodeResources(vcpu.getFirst(), memory.getFirst(), disk.getFirst(), bandwith.getFirst(), diskSpeed, storageType); - var max = new NodeResources(vcpu.getSecond(), memory.getSecond(), disk.getSecond(), bandwith.getSecond(), diskSpeed, storageType); + var min = new NodeResources(vcpu.getFirst(), memory.getFirst(), disk.getFirst(), bandwidth.getFirst(), diskSpeed, storageType); + var max = new NodeResources(vcpu.getSecond(), memory.getSecond(), disk.getSecond(), bandwidth.getSecond(), diskSpeed, storageType); return new Pair<>(min, max); } diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/NodeResources.java b/config-provisioning/src/main/java/com/yahoo/config/provision/NodeResources.java index 5daaee4299e..70db2c6b5d0 100644 --- a/config-provisioning/src/main/java/com/yahoo/config/provision/NodeResources.java +++ b/config-provisioning/src/main/java/com/yahoo/config/provision/NodeResources.java @@ -108,7 +108,7 @@ public class NodeResources { this.vcpu = validate(vcpu, "vcpu"); this.memoryGb = validate(memoryGb, "memory"); this.diskGb = validate(diskGb, "disk"); - this.bandwidthGbps = validate(bandwidthGbps, "bandwith"); + this.bandwidthGbps = validate(bandwidthGbps, "bandwidth"); this.diskSpeed = diskSpeed; this.storageType = storageType; } diff --git a/config-provisioning/src/test/java/com/yahoo/config/provision/NodeResourcesTest.java b/config-provisioning/src/test/java/com/yahoo/config/provision/NodeResourcesTest.java index e82a03db7fb..807c5d0a273 100644 --- a/config-provisioning/src/test/java/com/yahoo/config/provision/NodeResourcesTest.java +++ b/config-provisioning/src/test/java/com/yahoo/config/provision/NodeResourcesTest.java @@ -25,10 +25,10 @@ public class NodeResourcesTest { @Test public void testInvalid() { - assertInvalid("vcpu", () -> new NodeResources(Double.NaN, 1.0, 1.0, 1.0)); - assertInvalid("memory", () -> new NodeResources(1.0, Double.NaN, 1.0, 1.0)); - assertInvalid("disk", () -> new NodeResources(1.0, 1.0, Double.NaN, 1.0)); - assertInvalid("bandwith", () -> new NodeResources(1.0, 1.0, 1.0, Double.NaN)); + assertInvalid("vcpu", () -> new NodeResources(Double.NaN, 1.0, 1.0, 1.0)); + assertInvalid("memory", () -> new NodeResources(1.0, Double.NaN, 1.0, 1.0)); + assertInvalid("disk", () -> new NodeResources(1.0, 1.0, Double.NaN, 1.0)); + assertInvalid("bandwidth", () -> new NodeResources(1.0, 1.0, 1.0, Double.NaN)); } @Test -- cgit v1.2.3