diff options
author | Harald Musum <musum@yahoo-inc.com> | 2017-11-21 16:34:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-21 16:34:47 +0100 |
commit | 68baa91316a8ad002b64fba44294f1e97bbb04e0 (patch) | |
tree | 443b87fb94fda21f4108ad148d873be2a4d41b07 /config-model | |
parent | 3689ca92f9e65a076771ed67a58f6d5e9ae7890d (diff) | |
parent | 2ccc391e1aa9bd190d1d40dcd1c01cf85fe5a5c6 (diff) |
Merge pull request #4224 from vespa-engine/arnej/logd-add-state-reporter
skeleton for state reporting in logd
Diffstat (limited to 'config-model')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/Logd.java | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/Logd.java b/config-model/src/main/java/com/yahoo/vespa/model/Logd.java index f15c60ca3c0..0f7418582a3 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/Logd.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/Logd.java @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model; +import com.yahoo.cloud.config.log.LogdConfig; + /** * There is one logd running on each Vespa host, and one instance of * this class is therefore created by each instance of class {@link @@ -8,7 +10,10 @@ package com.yahoo.vespa.model; * * @author gjoranv */ -public class Logd extends AbstractService { +public class Logd + extends AbstractService + implements LogdConfig.Producer +{ /** * Creates a new Logd instance. @@ -17,18 +22,28 @@ public class Logd extends AbstractService { super(host, "logd"); setProp("clustertype", "hosts"); setProp("clustername", "admin"); + portsMeta.on(0).tag("http").tag("state"); } /** - * Logd does not need any ports. + * Logd needs a state port. * * @return The number of ports reserved by the logd */ - public int getPortCount() { return 0; } + public int getPortCount() { return 1; } + + /** Returns the desired base port for this service. */ + public int getWantedPort() { return 19089; } - /** + /** * @return The command used to start logd */ public String getStartupCommand() { return "exec sbin/vespa-logd"; } + @Override + public int getHealthPort() { return getRelativePort(0); } + + public void getConfig(LogdConfig.Builder builder) { + builder.stateport(getHealthPort()); + } } |