Package com.yahoo.vespa.model.search
Class SearchNode
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.search.SearchNode
- All Implemented Interfaces:
com.yahoo.cloud.config.filedistribution.FiledistributorrpcConfig.Producer,com.yahoo.config.ConfigInstance.Producer,com.yahoo.metrics.MetricsmanagerConfig.Producer,com.yahoo.searchlib.TranslogserverConfig.Producer,com.yahoo.vespa.config.search.core.ProtonConfig.Producer,ConfigProducer,NetworkPortRequestor,SearchInterface,Service,Serializable
public class SearchNode
extends AbstractService
implements SearchInterface, com.yahoo.vespa.config.search.core.ProtonConfig.Producer, com.yahoo.cloud.config.filedistribution.FiledistributorrpcConfig.Producer, com.yahoo.metrics.MetricsmanagerConfig.Producer, com.yahoo.searchlib.TranslogserverConfig.Producer
Represents a search node (proton).
Due to the current disconnect between StorageNode and SearchNode, we have to duplicate the set of RestartConfigs classes from StorageNode here, as SearchNode runs in a content/storage node context without this being immediately obvious in the model.
- Author:
- arnej27959, hmusum
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.yahoo.vespa.model.AbstractService
portsMetaFields inherited from class com.yahoo.config.model.producer.AnyConfigProducer
log -
Method Summary
Modifier and TypeMethodDescriptionvoidallocatePorts(int start, PortAllocBridge from) allocate the ports you needstatic SearchNodecreate(TreeConfigProducer<?> parent, String name, int distributionKey, NodeSpec nodeSpec, String clusterName, AbstractService serviceLayerService, boolean flushOnShutdown, Tuning tuning, boolean isHostedVespa, double fractionOfMemoryReserved, Boolean syncTransactionLog) voidgetConfig(com.yahoo.cloud.config.filedistribution.FiledistributorrpcConfig.Builder builder) voidgetConfig(com.yahoo.metrics.MetricsmanagerConfig.Builder builder) voidgetConfig(com.yahoo.searchlib.TranslogserverConfig.Builder builder) voidgetConfig(com.yahoo.vespa.config.search.core.ProtonConfig.Builder builder) Overridden by subclasses.intintThe service HTTP port for health statusintReturns the number of ports needed by this service.Services that wish that a command should be run before shutdown should return the command here.intReturns the type of service.Must be overridden by services that should be started by config-sentinel.voidsetResourceLimits(ResourceLimits resourceLimits) toString()Methods inherited from class com.yahoo.vespa.model.AbstractService
addEnvironmentVariable, addEnvironmentVariable, appendJvmOptions, defaultPreload, distributeCpuSocketAffinity, getAffinity, getEnvStringForTesting, getEnvVars, getHost, getHostName, getHostResource, getId, getIndex, getJvmOptions, getNumPortsAllocated, getPortsMeta, getPreLoad, getRelativePort, getServiceInfo, getServiceName, getServicePropertyString, getServicePropertyString, getWantedPort, initService, isInitialized, prependJvmOptions, remove, requiresWantedPort, setAffinity, setBasePort, setCoreOnOOM, setHostResource, setJvmOptions, setMMapNoCoreLimit, setNoVespaMalloc, setPreLoad, setProp, setProp, setVespaMalloc, setVespaMallocDebug, setVespaMallocDebugStackTraceMethods 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.search.SearchInterface
getHostNameMethods inherited from interface com.yahoo.vespa.model.Service
getLogctlSpecs
-
Method Details
-
create
public static SearchNode create(TreeConfigProducer<?> parent, String name, int distributionKey, NodeSpec nodeSpec, String clusterName, AbstractService serviceLayerService, boolean flushOnShutdown, Tuning tuning, boolean isHostedVespa, double fractionOfMemoryReserved, Boolean syncTransactionLog) -
getClusterName
-
getNodeSpec
- Specified by:
getNodeSpecin interfaceSearchInterface
-
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
-
getRpcPort
public int getRpcPort() -
getHealthPort
public int getHealthPort()Description copied from class:AbstractServiceThe service HTTP port for health status- Specified by:
getHealthPortin interfaceService- Overrides:
getHealthPortin classAbstractService
-
getServiceType
Description copied from class:AbstractServiceReturns the type of service. This is the class name without the package prefix by default, never null- Specified by:
getServiceTypein interfaceNetworkPortRequestor- Overrides:
getServiceTypein classAbstractService
-
getDistributionKey
public int getDistributionKey() -
getConfig
public void getConfig(com.yahoo.searchlib.TranslogserverConfig.Builder builder) - Specified by:
getConfigin interfacecom.yahoo.searchlib.TranslogserverConfig.Producer
-
toString
- Overrides:
toStringin classAbstractService
-
getServiceLayerService
-
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.
-
getConfig
public void getConfig(com.yahoo.cloud.config.filedistribution.FiledistributorrpcConfig.Builder builder) - Specified by:
getConfigin interfacecom.yahoo.cloud.config.filedistribution.FiledistributorrpcConfig.Producer
-
getConfig
public void getConfig(com.yahoo.vespa.config.search.core.ProtonConfig.Builder builder) - Specified by:
getConfigin interfacecom.yahoo.vespa.config.search.core.ProtonConfig.Producer
-
getDefaultMetricDimensions
Description copied from class:AbstractServiceOverridden by subclasses. List of default dimensions to be added to this services metrics- Specified by:
getDefaultMetricDimensionsin interfaceService- Overrides:
getDefaultMetricDimensionsin classAbstractService- Returns:
- the default dimensions for this service
-
getConfig
public void getConfig(com.yahoo.metrics.MetricsmanagerConfig.Builder builder) - Specified by:
getConfigin interfacecom.yahoo.metrics.MetricsmanagerConfig.Producer
-
getPreShutdownCommand
Description copied from interface:ServiceServices 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:
getPreShutdownCommandin interfaceService- Overrides:
getPreShutdownCommandin classAbstractService
-
setResourceLimits
-