Class MetricsProxyContainer
- java.lang.Object
-
- com.yahoo.config.model.producer.AbstractConfigProducer<AbstractConfigProducer<?>>
-
- 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
,ConfigProducer
,NetworkPortRequestor
,Service
,java.io.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
Container running a metrics proxy.- Author:
- gjoranv
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
BASEPORT
-
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.AbstractConfigProducer
log
-
-
Constructor Summary
Constructors Constructor Description MetricsProxyContainer(AbstractConfigProducer parent, java.lang.String hostname, int index, boolean isHostedVespa)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
allocatePorts(int start, PortAllocBridge from)
allocate the ports you needvoid
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)
int
getPortCount()
Returns the number of ports needed by this service.int
getWantedPort()
Returns the desired base port for the first instance of the service type.protected com.yahoo.config.model.api.container.ContainerServiceType
myServiceType()
Subclasses must implement this for a custom service name.boolean
requiresWantedPort()
First Qrserver or container must run on ports familiar to the user.-
Methods inherited from class com.yahoo.vespa.model.container.Container
addBuiltinHandlers, addComponent, addHandler, addSimpleComponent, getAssignedJvmOptions, getComponents, getConfig, getConfig, getConfig, getConfig, getConfig, getDefaultHttpServer, getDefaultMetricDimensions, getHandlers, getHealthPort, getHttp, getHttpServer, getSearchPort, getServiceType, getStartupCommand, index, initService, isRetired, numMessageBusPorts, numRpcPorts, setClusterName, setHostResponseHeaderKey, useDynamicPorts
-
Methods inherited from class com.yahoo.vespa.model.AbstractService
appendJvmOptions, distributeCpuSocketAffinity, getAffinity, getCoreOnOOM, getCoreOnOOMEnvVariable, getEnvVariables, getHost, getHostName, getHostResource, getId, getIndex, getJvmOptions, getMMapNoCoreEnvVariable, getMMapNoCoreLimit, getNoVespaMalloc, getNoVespaMallocEnvVariable, getNumPortsAllocated, getPortsMeta, getPreLoad, getPreShutdownCommand, getRelativePort, getServiceInfo, getServiceName, getServicePropertyString, getServicePropertyString, getVespaMalloc, getVespaMallocDebug, getVespaMallocDebugEnvVariable, getVespaMallocDebugStackTrace, getVespaMallocDebugStackTraceEnvVariable, getVespaMallocEnvVariable, isInitialized, prependJvmOptions, sendFile, sendUri, setAffinity, setBasePort, setCoreOnOOM, setHostResource, setJvmOptions, setMMapNoCoreLimit, setNoVespaMalloc, setPreLoad, setProp, setProp, setVespaMalloc, setVespaMallocDebug, setVespaMallocDebugStackTrace, toString
-
Methods inherited from class com.yahoo.config.model.producer.AbstractConfigProducer
addChild, addConfigId, addDescendantService, addUserConfig, cascadeConfig, dump, getChildren, getChildrenByTypeRecursive, getConfigClassLoader, getConfigId, getDescendantServices, getMonitoringService, getParent, getRoot, getSubId, getUserConfigs, hostSystem, mergeUserConfigs, removeChild, setParent, setUserConfigs, stateIsHosted, validate
-
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
-
-
-
-
Field Detail
-
BASEPORT
public static final int BASEPORT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MetricsProxyContainer
public MetricsProxyContainer(AbstractConfigProducer parent, java.lang.String hostname, int index, boolean isHostedVespa)
-
-
Method Detail
-
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
-
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 Qrserver or container must run on ports familiar to the user.- Specified by:
requiresWantedPort
in interfaceNetworkPortRequestor
- Overrides:
requiresWantedPort
in classContainer
- Returns:
- false by default
-
allocatePorts
public void allocatePorts(int start, PortAllocBridge from)
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
-
-