diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-02-02 18:37:53 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2022-02-02 18:37:53 +0100 |
commit | b8438c19dd4bfd19ab5db7abd5af053cc1d7cc4b (patch) | |
tree | 8de1524e0394c3698a5a1afc8cfe750a5108538b /config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java | |
parent | f095e16d4fa4b919fb1bf1a7f509322638d0fa6b (diff) |
Produce LinkedHashSets to get deterministic order
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java index 5bf7ea0b290..6982f10f658 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java @@ -40,6 +40,7 @@ import com.yahoo.vespa.model.utils.FileSender; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; @@ -96,12 +97,12 @@ public final class ApplicationContainerCluster extends ContainerCluster<Applicat public ApplicationContainerCluster(AbstractConfigProducer<?> parent, String configSubId, String clusterId, DeployState deployState) { super(parent, configSubId, clusterId, deployState, true, 10); this.tlsClientAuthority = deployState.tlsClientAuthority(); - previousHosts = deployState.getPreviousModel().stream() - .map(Model::allocatedHosts) - .map(AllocatedHosts::getHosts) - .flatMap(Collection::stream) - .map(HostSpec::hostname) - .collect(Collectors.toUnmodifiableSet()); + previousHosts = Collections.unmodifiableSet(deployState.getPreviousModel().stream() + .map(Model::allocatedHosts) + .map(AllocatedHosts::getHosts) + .flatMap(Collection::stream) + .map(HostSpec::hostname) + .collect(Collectors.toCollection(() -> new LinkedHashSet<>()))); addSimpleComponent("com.yahoo.language.provider.DefaultLinguisticsProvider"); addSimpleComponent("com.yahoo.language.provider.DefaultEmbedderProvider"); |