Package com.yahoo.vespa.model.admin
Class Slobrok
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.admin.Slobrok
- All Implemented Interfaces:
com.yahoo.config.ConfigInstance.Producer,com.yahoo.vespa.config.core.StateserverConfig.Producer,ConfigProducer,NetworkPortRequestor,Service,Serializable
public class Slobrok
extends AbstractService
implements com.yahoo.vespa.config.core.StateserverConfig.Producer
Represents a Slobrok service.
- Author:
- gjoranv
- See Also:
-
Field Summary
FieldsFields inherited from class com.yahoo.vespa.model.AbstractService
portsMetaFields inherited from class com.yahoo.config.model.producer.AnyConfigProducer
log -
Constructor Summary
ConstructorsConstructorDescriptionSlobrok(TreeConfigProducer<?> parent, int index, com.yahoo.config.model.api.ModelContext.FeatureFlags featureFlags) -
Method Summary
Modifier and TypeMethodDescriptionvoidallocatePorts(int start, PortAllocBridge from) allocate the ports you needvoidgetConfig(com.yahoo.vespa.config.core.StateserverConfig.Builder builder) intThe service HTTP port for health statusintReturns the number of ports needed by this service.Must be overridden by services that should be started by config-sentinel.intReturns the desired base port for the first instance of the service type.Methods inherited from class com.yahoo.vespa.model.AbstractService
addEnvironmentVariable, addEnvironmentVariable, appendJvmOptions, defaultPreload, distributeCpuSocketAffinity, getAffinity, getDefaultMetricDimensions, getEnvStringForTesting, getEnvVars, getHost, getHostName, getHostResource, getId, getIndex, getJvmOptions, getNumPortsAllocated, getPortsMeta, getPreLoad, getPreShutdownCommand, getRelativePort, getServiceInfo, getServiceName, getServicePropertyString, getServicePropertyString, getServiceType, initService, isInitialized, prependJvmOptions, remove, requiresWantedPort, setAffinity, setBasePort, setCoreOnOOM, setHostResource, setJvmOptions, setMMapNoCoreLimit, setNoVespaMalloc, setPreLoad, setProp, setProp, setVespaMalloc, setVespaMallocDebug, setVespaMallocDebugStackTrace, toStringMethods inherited from class com.yahoo.config.model.producer.TreeConfigProducer
addChild, addDescendantService, getChildren, getChildrenByTypeRecursive, getConfigClassLoader, getDescendantServices, removeChild, validateMethods inherited from class com.yahoo.config.model.producer.AnyConfigProducer
addConfigId, addUserConfig, cascadeConfig, currentConfigId, findInheritedClassLoader, getConfigId, getMonitoringService, getParent, getRoot, getSubId, getUserConfigs, hostSystem, mergeUserConfigs, setParent, setUserConfigs, stateIsHostedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.yahoo.vespa.model.ConfigProducer
addUserConfig, cascadeConfig, dump, getChildren, getConfigId, getDescendantServices, getUserConfigs, hostSystem, validateMethods inherited from interface com.yahoo.vespa.model.NetworkPortRequestor
getConfigIdMethods inherited from interface com.yahoo.vespa.model.Service
getLogctlSpecs
-
Field Details
-
BASEPORT
public static final int BASEPORT- See Also:
-
-
Constructor Details
-
Slobrok
public Slobrok(TreeConfigProducer<?> parent, int index, com.yahoo.config.model.api.ModelContext.FeatureFlags featureFlags) - Parameters:
parent- the parent ConfigProducer.index- unique index for all slobroks
-
-
Method Details
-
getConfig
public void getConfig(com.yahoo.vespa.config.core.StateserverConfig.Builder builder) - Specified by:
getConfigin interfacecom.yahoo.vespa.config.core.StateserverConfig.Producer
-
getWantedPort
public int getWantedPort()Description copied from class:AbstractServiceReturns 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:
getWantedPortin interfaceNetworkPortRequestor- Overrides:
getWantedPortin classAbstractService- Returns:
- The desired base port for the first instance of the service type.
-
getStartupCommand
Description copied from class:AbstractServiceMust be overridden by services that should be started by config-sentinel. The returned value will be used in config-sentinel configuration. Returns empty by default.- Specified by:
getStartupCommandin interfaceService- Overrides:
getStartupCommandin classAbstractService- Returns:
- empty by default.
-
allocatePorts
Description copied from interface:NetworkPortRequestorallocate the ports you need- Specified by:
allocatePortsin interfaceNetworkPortRequestor
-
getPortCount
public int getPortCount()Description copied from interface:NetworkPortRequestorReturns 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:
getPortCountin interfaceNetworkPortRequestor- Returns:
- The number of ports needed by the slobrok.
-
getHealthPort
public int getHealthPort()Description copied from class:AbstractServiceThe service HTTP port for health status- Specified by:
getHealthPortin interfaceService- Overrides:
getHealthPortin classAbstractService- Returns:
- The port on which the state server should respond
-
getConnectionSpec
- Returns:
- The connection spec to this Slobrok
-