Package com.yahoo.vespa.model.container
Class ApplicationContainer
- 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.container.ApplicationContainer
-
- All Implemented Interfaces:
com.yahoo.cloud.config.ZookeeperServerConfig.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 final class ApplicationContainer extends Container implements com.yahoo.search.config.QrStartConfig.Producer, com.yahoo.cloud.config.ZookeeperServerConfig.Producer
A container that is typically used by container clusters set up from the user application.- Author:
- gjoranv
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.yahoo.vespa.model.container.Container
allocatedMessagingPort, allocatedRpcPort, allocatedSearchPort, BASEPORT, 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 ApplicationContainer(AbstractConfigProducer<?> parent, String name, boolean retired, int index, DeployState deployState)
ApplicationContainer(AbstractConfigProducer<?> parent, String name, int index, DeployState deployState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
getConfig(com.yahoo.cloud.config.ZookeeperServerConfig.Builder builder)
void
getConfig(com.yahoo.search.config.QrStartConfig.Builder builder)
String
getJvmOptions()
Returns the jvm arguments this should start withOptional<String>
getPreShutdownCommand()
Services that wish that a command should be run before shutdown should return the command here.protected String
jvmOmitStackTraceInFastThrowOption(com.yahoo.config.model.api.ModelContext.FeatureFlags featureFlags)
protected com.yahoo.config.model.api.container.ContainerServiceType
myServiceType()
Subclasses must implement this for a custom service name.-
Methods inherited from class com.yahoo.vespa.model.container.Container
addBuiltinHandlers, addComponent, addHandler, addSimpleComponent, allocatePorts, containerCluster, getAssignedJvmOptions, getComponents, getConfig, getConfig, getConfig, getConfig, getConfig, getDefaultHttpServer, getDefaultMetricDimensions, getHandlers, getHealthPort, getHttp, getHttpServer, getPortCount, getRpcPort, getSearchPort, getServiceType, getStartupCommand, getWantedPort, index, initService, isRetired, numMessageBusPorts, numRpcPorts, requiresWantedPort, setClusterName, setHostResponseHeaderKey, useDynamicPorts
-
Methods inherited from class com.yahoo.vespa.model.AbstractService
appendJvmOptions, defaultPreload, distributeCpuSocketAffinity, getAffinity, getCoreOnOOM, getCoreOnOOMEnvVariable, getEnvVariables, getHost, getHostName, getHostResource, getId, getIndex, getMMapNoCoreEnvVariable, getMMapNoCoreLimit, getNoVespaMalloc, getNoVespaMallocEnvVariable, getNumPortsAllocated, getOmpNumThreads, getOmpNumThreadsEnvVariable, getPortsMeta, getPreLoad, getRelativePort, getServiceInfo, getServiceName, getServicePropertyString, getServicePropertyString, getVespaMalloc, getVespaMallocDebug, getVespaMallocDebugEnvVariable, getVespaMallocDebugStackTrace, getVespaMallocDebugStackTraceEnvVariable, getVespaMallocEnvVariable, isInitialized, prependJvmOptions, remove, setAffinity, setBasePort, setCoreOnOOM, setHostResource, setJvmOptions, setMMapNoCoreLimit, setNoVespaMalloc, setOmpNumThreads, 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
-
-
-
-
Constructor Detail
-
ApplicationContainer
public ApplicationContainer(AbstractConfigProducer<?> parent, String name, int index, DeployState deployState)
-
ApplicationContainer
public ApplicationContainer(AbstractConfigProducer<?> parent, String name, boolean retired, int index, DeployState deployState)
-
-
Method Detail
-
getConfig
public void getConfig(com.yahoo.search.config.QrStartConfig.Builder builder)
- Specified by:
getConfig
in interfacecom.yahoo.search.config.QrStartConfig.Producer
-
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
-
getJvmOptions
public String getJvmOptions()
Returns the jvm arguments this should start with- Specified by:
getJvmOptions
in interfaceService
- Overrides:
getJvmOptions
in classAbstractService
-
getConfig
public void getConfig(com.yahoo.cloud.config.ZookeeperServerConfig.Builder builder)
- Specified by:
getConfig
in interfacecom.yahoo.cloud.config.ZookeeperServerConfig.Producer
-
jvmOmitStackTraceInFastThrowOption
protected String jvmOmitStackTraceInFastThrowOption(com.yahoo.config.model.api.ModelContext.FeatureFlags featureFlags)
- Overrides:
jvmOmitStackTraceInFastThrowOption
in classContainer
-
getPreShutdownCommand
public Optional<String> 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
-
-