Class MetricsProxyContainer
java.lang.Object
com.yahoo.config.model.producer.AnyConfigProducer
com.yahoo.config.model.producer.TreeConfigProducer<AnyConfigProducer>
com.yahoo.vespa.model.AbstractService
com.yahoo.vespa.model.container.Container
com.yahoo.vespa.model.admin.metricsproxy.MetricsProxyContainer
- All Implemented Interfaces:
ai.vespa.metricsproxy.http.metrics.NodeInfoConfig.Producer
,ai.vespa.metricsproxy.metric.dimensions.NodeDimensionsConfig.Producer
,ai.vespa.metricsproxy.rpc.RpcConnectorConfig.Producer
,ai.vespa.metricsproxy.service.VespaServicesConfig.Producer
,com.yahoo.config.ConfigInstance.Producer
,com.yahoo.container.ComponentsConfig.Producer
,com.yahoo.container.core.ContainerHttpConfig.Producer
,com.yahoo.container.jdisc.ContainerMbusConfig.Producer
,com.yahoo.container.jdisc.JdiscBindingsConfig.Producer
,com.yahoo.container.QrConfig.Producer
,com.yahoo.search.config.QrStartConfig.Producer
,ConfigProducer
,NetworkPortRequestor
,Service
,Serializable
public class MetricsProxyContainer
extends Container
implements ai.vespa.metricsproxy.metric.dimensions.NodeDimensionsConfig.Producer, ai.vespa.metricsproxy.http.metrics.NodeInfoConfig.Producer, ai.vespa.metricsproxy.rpc.RpcConnectorConfig.Producer, ai.vespa.metricsproxy.service.VespaServicesConfig.Producer, com.yahoo.search.config.QrStartConfig.Producer
Container running a metrics proxy.
- Author:
- gjoranv
- See Also:
-
Field Summary
Fields inherited from class com.yahoo.vespa.model.container.Container
allocatedMessagingPort, allocatedRpcPort, allocatedSearchPort, parent, SINGLENODE_CONTAINER_SERVICESPEC
Fields inherited from class com.yahoo.vespa.model.AbstractService
portsMeta
Fields inherited from class com.yahoo.config.model.producer.AnyConfigProducer
log
-
Constructor Summary
ConstructorDescriptionMetricsProxyContainer
(MetricsProxyContainerCluster cluster, HostResource host, int index, DeployState deployState) -
Method Summary
Modifier and TypeMethodDescriptionvoid
allocatePorts
(int start, PortAllocBridge from) allocate the ports you needprotected String
void
getConfig
(ai.vespa.metricsproxy.http.metrics.NodeInfoConfig.Builder builder) void
getConfig
(ai.vespa.metricsproxy.metric.dimensions.NodeDimensionsConfig.Builder builder) void
getConfig
(ai.vespa.metricsproxy.rpc.RpcConnectorConfig.Builder builder) void
getConfig
(ai.vespa.metricsproxy.service.VespaServicesConfig.Builder builder) void
getConfig
(com.yahoo.search.config.QrStartConfig.Builder builder) int
Returns the number of ports needed by this service.Services that wish that a command should be run before shutdown should return the command here.int
Returns the desired base port for the first instance of the service type.protected String
jvmOmitStackTraceInFastThrowOption
(com.yahoo.config.model.api.ModelContext.FeatureFlags featureFlags) protected com.yahoo.config.model.api.container.ContainerServiceType
Subclasses must implement this for a custom service name.boolean
First container must run on ports familiar to the user.Methods inherited from class com.yahoo.vespa.model.container.Container
addBuiltinHandlers, addComponent, addHandler, addSimpleComponent, containerCluster, getAssignedJvmOptions, getComponents, getConfig, getConfig, getConfig, getConfig, getConfig, getDefaultHttpServer, getDefaultMetricDimensions, getHandlers, getHealthPort, getHttp, getRpcPort, getSearchPort, getServiceType, getStartupCommand, index, initService, isRetired, numMessageBusPorts, numRpcPorts, prepareStopCommand, setClusterName, setHostResponseHeaderKey, useDynamicPorts
Methods inherited from class com.yahoo.vespa.model.AbstractService
addEnvironmentVariable, addEnvironmentVariable, appendJvmOptions, distributeCpuSocketAffinity, getAffinity, getEnvStringForTesting, getEnvVars, getHost, getHostName, getHostResource, getId, getIndex, getJvmOptions, getNumPortsAllocated, getPortsMeta, getPreLoad, getRelativePort, getServiceInfo, getServiceName, getServicePropertyString, getServicePropertyString, isInitialized, prependJvmOptions, remove, setAffinity, setBasePort, setCoreOnOOM, setHostResource, setJvmOptions, setMMapNoCoreLimit, setNoVespaMalloc, setPreLoad, setProp, setProp, setVespaMalloc, setVespaMallocDebug, setVespaMallocDebugStackTrace, toString
Methods inherited from class com.yahoo.config.model.producer.TreeConfigProducer
addChild, addDescendantService, getChildren, getChildrenByTypeRecursive, getConfigClassLoader, getDescendantServices, removeChild, validate
Methods inherited from class com.yahoo.config.model.producer.AnyConfigProducer
addConfigId, addUserConfig, cascadeConfig, currentConfigId, findInheritedClassLoader, getConfigId, getMonitoringService, getParent, getRoot, getSubId, getUserConfigs, hostSystem, mergeUserConfigs, setParent, setUserConfigs, stateIsHosted
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.yahoo.vespa.model.ConfigProducer
addUserConfig, cascadeConfig, dump, getChildren, getConfigId, getDescendantServices, getUserConfigs, hostSystem, validate
Methods inherited from interface com.yahoo.vespa.model.NetworkPortRequestor
getConfigId
Methods inherited from interface com.yahoo.vespa.model.Service
getLogctlSpecs
-
Field Details
-
BASEPORT
public static final int BASEPORT- See Also:
-
-
Constructor Details
-
MetricsProxyContainer
public MetricsProxyContainer(MetricsProxyContainerCluster cluster, HostResource host, int index, DeployState deployState)
-
-
Method Details
-
myServiceType
protected com.yahoo.config.model.api.container.ContainerServiceType myServiceType()Description copied from class:Container
Subclasses must implement this for a custom service name.- Specified by:
myServiceType
in classContainer
-
jvmOmitStackTraceInFastThrowOption
protected String jvmOmitStackTraceInFastThrowOption(com.yahoo.config.model.api.ModelContext.FeatureFlags featureFlags) - Overrides:
jvmOmitStackTraceInFastThrowOption
in classContainer
-
getWantedPort
public int getWantedPort()Description copied from class:AbstractService
Returns the desired base port for the first instance of the service type. Returns '0' as default, which means that the service type should use the default port allocation mechanism.- Specified by:
getWantedPort
in interfaceNetworkPortRequestor
- Overrides:
getWantedPort
in classContainer
- Returns:
- The desired base port for the first instance of the service type.
-
requiresWantedPort
public boolean requiresWantedPort()Description copied from class:Container
First container must run on ports familiar to the user.- Specified by:
requiresWantedPort
in interfaceNetworkPortRequestor
- Overrides:
requiresWantedPort
in classContainer
- Returns:
- false by default
-
allocatePorts
Description copied from interface:NetworkPortRequestor
allocate the ports you need- Specified by:
allocatePorts
in interfaceNetworkPortRequestor
- Overrides:
allocatePorts
in classContainer
-
getPortCount
public int getPortCount()Description copied from interface:NetworkPortRequestor
Returns the number of ports needed by this service. User-defined ports for container http servers should not be counted, as those ports are required to be outside Vespa's port range.- Specified by:
getPortCount
in interfaceNetworkPortRequestor
- Overrides:
getPortCount
in classContainer
- Returns:
- the number of ports needed by the Container
-
getConfig
public void getConfig(ai.vespa.metricsproxy.rpc.RpcConnectorConfig.Builder builder) - Specified by:
getConfig
in interfaceai.vespa.metricsproxy.rpc.RpcConnectorConfig.Producer
-
getConfig
public void getConfig(ai.vespa.metricsproxy.service.VespaServicesConfig.Builder builder) - Specified by:
getConfig
in interfaceai.vespa.metricsproxy.service.VespaServicesConfig.Producer
-
getConfig
public void getConfig(ai.vespa.metricsproxy.metric.dimensions.NodeDimensionsConfig.Builder builder) - Specified by:
getConfig
in interfaceai.vespa.metricsproxy.metric.dimensions.NodeDimensionsConfig.Producer
-
getConfig
public void getConfig(ai.vespa.metricsproxy.http.metrics.NodeInfoConfig.Builder builder) - Specified by:
getConfig
in interfaceai.vespa.metricsproxy.http.metrics.NodeInfoConfig.Producer
-
getConfig
public void getConfig(com.yahoo.search.config.QrStartConfig.Builder builder) - Specified by:
getConfig
in interfacecom.yahoo.search.config.QrStartConfig.Producer
-
defaultPreload
- Overrides:
defaultPreload
in classAbstractService
-
getPreShutdownCommand
Description copied from interface:Service
Services that wish that a command should be run before shutdown should return the command here. The command will be executed by the config sentinel before sending SIGTERM to the service. The command is executed without a timeout.- Specified by:
getPreShutdownCommand
in interfaceService
- Overrides:
getPreShutdownCommand
in classAbstractService
-