diff options
author | Jon Bratseth <bratseth@gmail.com> | 2021-11-09 22:53:14 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2021-11-09 22:53:14 +0100 |
commit | 296e91de1079912b77fc3a18587b45ce07afb1c6 (patch) | |
tree | 0babd9a8021627bd495442911d8ee4b4fcb64fbe /container-disc | |
parent | a194124c85db40c11f1389aba844fd8da75ac718 (diff) |
Add application to systeminfo
Diffstat (limited to 'container-disc')
-rw-r--r-- | container-disc/src/main/java/com/yahoo/container/jdisc/SystemInfoProvider.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/container-disc/src/main/java/com/yahoo/container/jdisc/SystemInfoProvider.java b/container-disc/src/main/java/com/yahoo/container/jdisc/SystemInfoProvider.java index a34b7506666..39c4b108aa6 100644 --- a/container-disc/src/main/java/com/yahoo/container/jdisc/SystemInfoProvider.java +++ b/container-disc/src/main/java/com/yahoo/container/jdisc/SystemInfoProvider.java @@ -1,12 +1,14 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.container.jdisc; +import ai.vespa.cloud.ApplicationId; import ai.vespa.cloud.Cluster; import ai.vespa.cloud.Environment; import ai.vespa.cloud.Node; import ai.vespa.cloud.SystemInfo; import ai.vespa.cloud.Zone; import com.google.inject.Inject; +import com.yahoo.cloud.config.ApplicationIdConfig; import com.yahoo.cloud.config.ClusterInfoConfig; import com.yahoo.cloud.config.ConfigserverConfig; import com.yahoo.component.AbstractComponent; @@ -24,8 +26,14 @@ public class SystemInfoProvider extends AbstractComponent implements Provider<Sy private final SystemInfo instance; @Inject - public SystemInfoProvider(ConfigserverConfig csConfig, QrConfig qrConfig, ClusterInfoConfig ciConfig) { - this.instance = new SystemInfo(new Zone(Environment.valueOf(csConfig.environment()), csConfig.region()), + public SystemInfoProvider(ConfigserverConfig csConfig, + QrConfig qrConfig, + ClusterInfoConfig ciConfig, + ApplicationIdConfig applicationIdConfig) { + this.instance = new SystemInfo(new ApplicationId(applicationIdConfig.tenant(), + applicationIdConfig.application(), + applicationIdConfig.instance()), + new Zone(Environment.valueOf(csConfig.environment()), csConfig.region()), new Cluster(ciConfig.nodeCount(), ciConfig.nodeIndices()), new Node(qrConfig.nodeIndex())); } |