diff options
author | Harald Musum <musum@verizonmedia.com> | 2020-11-27 08:43:05 +0100 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2020-11-27 08:43:05 +0100 |
commit | 448b47928d2784d2ce31896e31532e1208699b89 (patch) | |
tree | 5416f286b1840c72a7bd0f1806a28d8c086ed698 /config-model/src/main/java | |
parent | 371e9b50738dafc28c7ab2aea6495d26ecd6c0c9 (diff) |
Id needs to be set for each container
Diffstat (limited to 'config-model/src/main/java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainer.java | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainer.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainer.java index cb8abb919ac..e1c4bdc3cba 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainer.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainer.java @@ -1,6 +1,7 @@ -// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.container; +import com.yahoo.cloud.config.ZookeeperServerConfig; import com.yahoo.config.model.api.container.ContainerServiceType; import com.yahoo.config.model.producer.AbstractConfigProducer; import com.yahoo.config.provision.NodeResources; @@ -15,17 +16,19 @@ import com.yahoo.vespa.model.container.component.Component; * * @author gjoranv */ -public final class ApplicationContainer extends Container implements QrStartConfig.Producer { +public final class ApplicationContainer extends Container implements + QrStartConfig.Producer, + ZookeeperServerConfig.Producer { private static final String defaultHostedJVMArgs = "-XX:+UseOSErrorReporting -XX:+SuppressFatalErrorMessage"; private final boolean isHostedVespa; - public ApplicationContainer(AbstractConfigProducer parent, String name, int index, boolean isHostedVespa) { + public ApplicationContainer(AbstractConfigProducer<?> parent, String name, int index, boolean isHostedVespa) { this(parent, name, false, index, isHostedVespa); } - public ApplicationContainer(AbstractConfigProducer parent, String name, boolean retired, int index, boolean isHostedVespa) { + public ApplicationContainer(AbstractConfigProducer<?> parent, String name, boolean retired, int index, boolean isHostedVespa) { super(parent, name, retired, index, isHostedVespa); this.isHostedVespa = isHostedVespa; @@ -51,7 +54,7 @@ public final class ApplicationContainer extends Container implements QrStartConf @Override protected ContainerServiceType myServiceType() { if (parent instanceof ContainerCluster) { - ContainerCluster cluster = (ContainerCluster)parent; + ContainerCluster<?> cluster = (ContainerCluster<?>)parent; // TODO: The 'qrserver' name is retained for legacy reasons (e.g. system tests and log parsing). if (cluster.getSearch() != null && cluster.getDocproc() == null && cluster.getDocumentApi() == null) { return ContainerServiceType.QRSERVER; @@ -70,6 +73,13 @@ public final class ApplicationContainer extends Container implements QrStartConf } private boolean hasDocproc() { - return (parent instanceof ContainerCluster) && (((ContainerCluster)parent).getDocproc() != null); + return (parent instanceof ContainerCluster) && (((ContainerCluster<?>)parent).getDocproc() != null); } + + @Override + public void getConfig(ZookeeperServerConfig.Builder builder) { + ((ApplicationContainerCluster)parent).getConfig(builder); + builder.myid(index()); + } + } |