Class 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:
  • 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

      public String getClusterName()
    • getNodeSpec

      public NodeSpec getNodeSpec()
      Specified by:
      getNodeSpec in interface SearchInterface
    • allocatePorts

      public void allocatePorts(int start, PortAllocBridge from)
      Description copied from interface: NetworkPortRequestor
      allocate the ports you need
      Specified by:
      allocatePorts in interface NetworkPortRequestor
    • 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 interface NetworkPortRequestor
    • getRpcPort

      public int getRpcPort()
    • getHealthPort

      public int getHealthPort()
      Description copied from class: AbstractService
      The service HTTP port for health status
      Specified by:
      getHealthPort in interface Service
      Overrides:
      getHealthPort in class AbstractService
    • getServiceType

      public String getServiceType()
      Description copied from class: AbstractService
      Returns the type of service. This is the class name without the package prefix by default, never null
      Specified by:
      getServiceType in interface NetworkPortRequestor
      Overrides:
      getServiceType in class AbstractService
    • getDistributionKey

      public int getDistributionKey()
    • getConfig

      public void getConfig(com.yahoo.searchlib.TranslogserverConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.searchlib.TranslogserverConfig.Producer
    • toString

      public String toString()
      Overrides:
      toString in class AbstractService
    • getServiceLayerService

      public AbstractService getServiceLayerService()
    • getStartupCommand

      public Optional<String> getStartupCommand()
      Description copied from class: AbstractService
      Must 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:
      getStartupCommand in interface Service
      Overrides:
      getStartupCommand in class AbstractService
      Returns:
      empty by default.
    • getConfig

      public void getConfig(com.yahoo.cloud.config.filedistribution.FiledistributorrpcConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.cloud.config.filedistribution.FiledistributorrpcConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.vespa.config.search.core.ProtonConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.vespa.config.search.core.ProtonConfig.Producer
    • getDefaultMetricDimensions

      public HashMap<String,String> getDefaultMetricDimensions()
      Description copied from class: AbstractService
      Overridden by subclasses. List of default dimensions to be added to this services metrics
      Specified by:
      getDefaultMetricDimensions in interface Service
      Overrides:
      getDefaultMetricDimensions in class AbstractService
      Returns:
      the default dimensions for this service
    • getConfig

      public void getConfig(com.yahoo.metrics.MetricsmanagerConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.metrics.MetricsmanagerConfig.Producer
    • 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 interface Service
      Overrides:
      getPreShutdownCommand in class AbstractService
    • setResourceLimits

      public void setResourceLimits(ResourceLimits resourceLimits)