Class ContainerCluster<CONTAINER extends Container>

java.lang.Object
com.yahoo.config.model.producer.AbstractConfigProducer<AbstractConfigProducer<?>>
com.yahoo.vespa.model.container.ContainerCluster<CONTAINER>
All Implemented Interfaces:
com.yahoo.cloud.config.ClusterInfoConfig.Producer, com.yahoo.cloud.config.ConfigserverConfig.Producer, com.yahoo.cloud.config.CuratorConfig.Producer, com.yahoo.config.ConfigInstance.Producer, com.yahoo.config.docproc.DocprocConfig.Producer, com.yahoo.config.docproc.SchemamappingConfig.Producer, com.yahoo.container.ComponentsConfig.Producer, com.yahoo.container.core.ApplicationMetadataConfig.Producer, com.yahoo.container.core.document.ContainerDocumentConfig.Producer, com.yahoo.container.di.config.PlatformBundlesConfig.Producer, com.yahoo.container.jdisc.config.HealthMonitorConfig.Producer, com.yahoo.container.jdisc.JdiscBindingsConfig.Producer, com.yahoo.container.QrSearchersConfig.Producer, com.yahoo.document.config.DocumentmanagerConfig.Producer, com.yahoo.prelude.semantics.SemanticRulesConfig.Producer, com.yahoo.search.config.IndexInfoConfig.Producer, com.yahoo.search.config.QrStartConfig.Producer, com.yahoo.search.config.SchemaInfoConfig.Producer, com.yahoo.search.pagetemplates.PageTemplatesConfig.Producer, com.yahoo.search.query.profile.config.QueryProfilesConfig.Producer, com.yahoo.vespa.configdefinition.IlscriptsConfig.Producer, ConfigProducer, Serializable
Direct Known Subclasses:
ApplicationContainerCluster, ClusterControllerContainerCluster, LogserverContainerCluster, MetricsProxyContainerCluster

public abstract class ContainerCluster<CONTAINER extends Container> extends AbstractConfigProducer<AbstractConfigProducer<?>> implements com.yahoo.container.ComponentsConfig.Producer, com.yahoo.container.jdisc.JdiscBindingsConfig.Producer, com.yahoo.document.config.DocumentmanagerConfig.Producer, com.yahoo.container.core.document.ContainerDocumentConfig.Producer, com.yahoo.container.jdisc.config.HealthMonitorConfig.Producer, com.yahoo.container.core.ApplicationMetadataConfig.Producer, com.yahoo.container.di.config.PlatformBundlesConfig.Producer, com.yahoo.search.config.IndexInfoConfig.Producer, com.yahoo.vespa.configdefinition.IlscriptsConfig.Producer, com.yahoo.config.docproc.SchemamappingConfig.Producer, com.yahoo.container.QrSearchersConfig.Producer, com.yahoo.search.config.QrStartConfig.Producer, com.yahoo.search.query.profile.config.QueryProfilesConfig.Producer, com.yahoo.search.pagetemplates.PageTemplatesConfig.Producer, com.yahoo.prelude.semantics.SemanticRulesConfig.Producer, com.yahoo.config.docproc.DocprocConfig.Producer, com.yahoo.cloud.config.ClusterInfoConfig.Producer, com.yahoo.cloud.config.ConfigserverConfig.Producer, com.yahoo.cloud.config.CuratorConfig.Producer, com.yahoo.search.config.SchemaInfoConfig.Producer
Parent class for all container cluster types.
Author:
gjoranv, Einar M R Rosenvinge, Tony Vaagenes
See Also:
  • Field Details

    • RESERVED_URI_PREFIX

      public static final String RESERVED_URI_PREFIX
      URI prefix used for internal, usually programmatic, APIs. URIs using this prefix should never be considered available for direct use by customers, and normal compatibility concerns only applies to libraries using the URIs in question, not contents served from the URIs themselves.
      See Also:
    • APPLICATION_STATUS_HANDLER_CLASS

      public static final String APPLICATION_STATUS_HANDLER_CLASS
      See Also:
    • BINDINGS_OVERVIEW_HANDLER_CLASS

      public static final String BINDINGS_OVERVIEW_HANDLER_CLASS
    • LOG_HANDLER_CLASS

      public static final String LOG_HANDLER_CLASS
    • G1GC

      public static final String G1GC
      See Also:
    • PARALLEL_GC

      public static final String PARALLEL_GC
      See Also:
    • STATE_HANDLER_CLASS

      public static final String STATE_HANDLER_CLASS
      See Also:
    • STATE_HANDLER_BINDING_1

      public static final BindingPattern STATE_HANDLER_BINDING_1
    • STATE_HANDLER_BINDING_2

      public static final BindingPattern STATE_HANDLER_BINDING_2
    • ROOT_HANDLER_PATH

      public static final String ROOT_HANDLER_PATH
      See Also:
    • ROOT_HANDLER_BINDING

      public static final BindingPattern ROOT_HANDLER_BINDING
    • VIP_HANDLER_BINDING

      public static final BindingPattern VIP_HANDLER_BINDING
    • SEARCH_AND_DOCPROC_BUNDLES

      public static final Set<Path> SEARCH_AND_DOCPROC_BUNDLES
    • containers

      protected List<CONTAINER extends Container> containers
  • Constructor Details

  • Method Details

    • id

      public com.yahoo.config.provision.ClusterSpec.Id id()
    • setZone

      public void setZone(com.yahoo.config.provision.Zone zone)
    • getZone

      public com.yahoo.config.provision.Zone getZone()
    • addDefaultHandlersWithVip

      public void addDefaultHandlersWithVip()
    • addDefaultHandlersExceptStatus

      public final void addDefaultHandlersExceptStatus()
    • addMetricStateHandler

      public void addMetricStateHandler()
    • addDefaultRootHandler

      public void addDefaultRootHandler()
    • addApplicationStatusHandler

      public void addApplicationStatusHandler()
    • addVipHandler

      public void addVipHandler()
    • addComponent

      public final void addComponent(Component<?,?> component)
    • addSimpleComponent

      public final void addSimpleComponent(String idSpec, String classSpec, String bundleSpec)
    • removeComponent

      public Component removeComponent(com.yahoo.component.ComponentId componentId)
      Removes a component by id
      Returns:
      the removed component, or null if it was not present
    • addSimpleComponent

      protected void addSimpleComponent(String className)
    • prepare

      public void prepare(DeployState deployState)
    • doPrepare

      protected abstract void doPrepare(DeployState deployState)
    • getName

      public String getName()
    • getContainers

      public List<CONTAINER> getContainers()
    • addContainer

      public void addContainer(CONTAINER container)
    • addContainers

      public void addContainers(Collection<CONTAINER> containers)
    • setProcessingChains

      public void setProcessingChains(ProcessingChains processingChains, BindingPattern... serverBindings)
    • getSearchChains

      public SearchChains getSearchChains()
    • getSearch

      public ContainerSearch getSearch()
    • setSearch

      public void setSearch(ContainerSearch containerSearch)
    • setHttp

      public void setHttp(Http http)
    • getHttp

      public Http getHttp()
    • getDocproc

      public ContainerDocproc getDocproc()
    • setDocproc

      public void setDocproc(ContainerDocproc containerDocproc)
    • getDocumentApi

      public ContainerDocumentApi getDocumentApi()
    • setDocumentApi

      public void setDocumentApi(ContainerDocumentApi containerDocumentApi)
    • getDocprocChains

      public DocprocChains getDocprocChains()
    • getHandlers

      public Collection<Handler> getHandlers()
    • setSecretStore

      public void setSecretStore(SecretStore secretStore)
    • getSecretStore

      public Optional<SecretStore> getSecretStore()
    • getComponentsMap

      public Map<com.yahoo.component.ComponentId,Component<?,?>> getComponentsMap()
    • getAllComponents

      public Collection<Component<?,?>> getAllComponents()
      Returns all components in this cluster (generic, handlers, chained)
    • addAllPlatformBundles

      public void addAllPlatformBundles()
    • addSearchAndDocprocBundles

      public void addSearchAndDocprocBundles()
    • getConfig

      public void getConfig(com.yahoo.container.ComponentsConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.container.ComponentsConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.container.jdisc.JdiscBindingsConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.container.jdisc.JdiscBindingsConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.document.config.DocumentmanagerConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.document.config.DocumentmanagerConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.container.core.document.ContainerDocumentConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.container.core.document.ContainerDocumentConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.container.jdisc.config.HealthMonitorConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.container.jdisc.config.HealthMonitorConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.container.core.ApplicationMetadataConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.container.core.ApplicationMetadataConfig.Producer
    • addCommonVespaBundles

      public void addCommonVespaBundles()
      Adds the Vespa bundles that are necessary for all container types.
    • addPlatformBundle

      public final void addPlatformBundle(Path bundlePath)
      Adds a bundle present at a known location at the target container nodes. Note that the set of platform bundles cannot change during the jdisc container's lifetime.
      Parameters:
      bundlePath - usually an absolute path, e.g. '$VESPA_HOME/lib/jars/foo.jar'
    • getConfig

      public void getConfig(com.yahoo.container.di.config.PlatformBundlesConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.container.di.config.PlatformBundlesConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.container.QrSearchersConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.container.QrSearchersConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.search.config.QrStartConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.search.config.QrStartConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.config.docproc.DocprocConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.config.docproc.DocprocConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.search.pagetemplates.PageTemplatesConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.search.pagetemplates.PageTemplatesConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.prelude.semantics.SemanticRulesConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.prelude.semantics.SemanticRulesConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.search.query.profile.config.QueryProfilesConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.search.query.profile.config.QueryProfilesConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.config.docproc.SchemamappingConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.config.docproc.SchemamappingConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.search.config.IndexInfoConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.search.config.IndexInfoConfig.Producer
    • getConfig

      public void getConfig(com.yahoo.search.config.SchemaInfoConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.search.config.SchemaInfoConfig.Producer
    • initialize

      public void initialize(Map<String,SearchCluster> clusterMap)
    • addDefaultSearchAccessLog

      public void addDefaultSearchAccessLog()
    • getConfig

      public void getConfig(com.yahoo.vespa.configdefinition.IlscriptsConfig.Builder builder)
      Specified by:
      getConfig in interface com.yahoo.vespa.configdefinition.IlscriptsConfig.Producer
    • getConfig

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

      public void getConfig(com.yahoo.cloud.config.ConfigserverConfig.Builder builder)
      Returns a config server config containing the right zone settings (and defaults for the rest). This is useful to allow applications to find out in which zone they are running by having the Zone object (which is constructed from this config) injected.
      Specified by:
      getConfig in interface com.yahoo.cloud.config.ConfigserverConfig.Producer
    • getConfig

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

      public boolean isHostedVespa()
    • concreteDocumentTypes

      public Map<String,String> concreteDocumentTypes()
    • setHostClusterId

      public void setHostClusterId(String clusterId)
    • getHostClusterId

      public Optional<String> getHostClusterId()
      Returns the id of the content cluster which hosts this container cluster, if any. This is only set with hosted clusters where this container cluster is set up to run on the nodes of a content cluster.
    • setJvmGCOptions

      public void setJvmGCOptions(String opts)
    • setEnvironmentVars

      public void setEnvironmentVars(String environmentVars)
    • getJvmGCOptions

      public Optional<String> getJvmGCOptions()
    • setRpcServerEnabled

      public final void setRpcServerEnabled(boolean rpcServerEnabled)
    • setHttpServerEnabled

      public void setHttpServerEnabled(boolean httpServerEnabled)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • messageBusEnabled

      protected abstract boolean messageBusEnabled()
    • setDeferChangesUntilRestart

      public void setDeferChangesUntilRestart(boolean deferChangesUntilRestart)
      Mark whether the config emitted by this cluster currently should be applied by clients already running with a previous generation of it only by restarting the consuming processes.
    • getDeferChangesUntilRestart

      public boolean getDeferChangesUntilRestart()
    • getMemoryPercentage

      public Optional<Integer> getMemoryPercentage()
      Returns the percentage of host physical memory this application has specified for nodes in this cluster, or empty if this is not specified by the application.