Class ContentCluster
- java.lang.Object
-
- com.yahoo.config.model.producer.AbstractConfigProducer
-
- com.yahoo.vespa.model.content.cluster.ContentCluster
-
- All Implemented Interfaces:
com.yahoo.config.ConfigInstance.Producer
,com.yahoo.metrics.MetricsmanagerConfig.Producer
,com.yahoo.vespa.config.content.core.BucketspacesConfig.Producer
,com.yahoo.vespa.config.content.core.StorDistributormanagerConfig.Producer
,com.yahoo.vespa.config.content.FleetcontrollerConfig.Producer
,com.yahoo.vespa.config.content.MessagetyperouteselectorpolicyConfig.Producer
,com.yahoo.vespa.config.content.StorDistributionConfig.Producer
,ConfigProducer
,java.io.Serializable
public class ContentCluster extends AbstractConfigProducer implements com.yahoo.vespa.config.content.StorDistributionConfig.Producer, com.yahoo.vespa.config.content.core.StorDistributormanagerConfig.Producer, com.yahoo.vespa.config.content.FleetcontrollerConfig.Producer, com.yahoo.metrics.MetricsmanagerConfig.Producer, com.yahoo.vespa.config.content.MessagetyperouteselectorpolicyConfig.Producer, com.yahoo.vespa.config.content.core.BucketspacesConfig.Producer
A content cluster.- Author:
- mostly somebody unknown, bratseth
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ContentCluster.Builder
static class
ContentCluster.DistributionMode
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.String,java.lang.Integer>
METRIC_INDEX_MAP
-
Fields inherited from class com.yahoo.config.model.producer.AbstractConfigProducer
log
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.yahoo.vespa.config.content.AllClustersBucketSpacesConfig.Cluster.Builder
clusterBucketSpaceConfigBuilder()
int
distributionBits()
Returns the distribution bits this cluster should use.ClusterControllerConfig
getClusterControllerConfig()
ClusterControllerContainerCluster
getClusterControllers()
Returns cluster controllers if this is multitenant, null otherwisestatic java.lang.String
getClusterId(ModelElement clusterElem)
void
getConfig(com.yahoo.metrics.MetricsmanagerConfig.Builder builder)
void
getConfig(com.yahoo.vespa.config.content.core.BucketspacesConfig.Builder builder)
void
getConfig(com.yahoo.vespa.config.content.core.StorDistributormanagerConfig.Builder builder)
void
getConfig(com.yahoo.vespa.config.content.FleetcontrollerConfig.Builder builder)
void
getConfig(com.yahoo.vespa.config.content.MessagetyperouteselectorpolicyConfig.Builder builder)
void
getConfig(com.yahoo.vespa.config.content.StorDistributionConfig.Builder builder)
ContentCluster.DistributionMode
getDistributionMode()
DistributorCluster
getDistributorNodes()
java.util.Map<java.lang.String,NewDocumentType>
getDocumentDefinitions()
The list of documentdefinitions declared at the cluster level.static com.yahoo.metrics.MetricsmanagerConfig.Consumer.Builder
getMetricBuilder(java.lang.String name, com.yahoo.metrics.MetricsmanagerConfig.Builder builder)
java.lang.String
getName()
PersistenceEngine.PersistenceFactory
getPersistence()
StorageGroup
getRootGroup()
java.lang.String
getRoutingSelector()
ContentSearchCluster
getSearch()
StorageCluster
getStorageNodes()
boolean
isGloballyDistributed(NewDocumentType docType)
boolean
isHosted()
void
prepare(DeployState deployState)
Redundancy
redundancy()
ContentCluster
setRedundancy(Redundancy redundancy)
void
validate()
check constraints depending on the state of the vespamodel graph.-
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
-
-
-
-
Method Detail
-
prepare
public void prepare(DeployState deployState)
-
getClusterControllers
public ClusterControllerContainerCluster getClusterControllers()
Returns cluster controllers if this is multitenant, null otherwise
-
getDistributionMode
public ContentCluster.DistributionMode getDistributionMode()
-
getClusterId
public static java.lang.String getClusterId(ModelElement clusterElem)
-
getName
public java.lang.String getName()
-
getRoutingSelector
public java.lang.String getRoutingSelector()
-
getDistributorNodes
public DistributorCluster getDistributorNodes()
-
getStorageNodes
public StorageCluster getStorageNodes()
-
getClusterControllerConfig
public ClusterControllerConfig getClusterControllerConfig()
-
getPersistence
public PersistenceEngine.PersistenceFactory getPersistence()
-
getDocumentDefinitions
public java.util.Map<java.lang.String,NewDocumentType> getDocumentDefinitions()
The list of documentdefinitions declared at the cluster level.- Returns:
- the set of documenttype names
-
isGloballyDistributed
public boolean isGloballyDistributed(NewDocumentType docType)
-
getSearch
public final ContentSearchCluster getSearch()
-
redundancy
public Redundancy redundancy()
-
setRedundancy
public ContentCluster setRedundancy(Redundancy redundancy)
-
getConfig
public void getConfig(com.yahoo.vespa.config.content.MessagetyperouteselectorpolicyConfig.Builder builder)
- Specified by:
getConfig
in interfacecom.yahoo.vespa.config.content.MessagetyperouteselectorpolicyConfig.Producer
-
getRootGroup
public StorageGroup getRootGroup()
-
getConfig
public void getConfig(com.yahoo.vespa.config.content.StorDistributionConfig.Builder builder)
- Specified by:
getConfig
in interfacecom.yahoo.vespa.config.content.StorDistributionConfig.Producer
-
getConfig
public void getConfig(com.yahoo.vespa.config.content.FleetcontrollerConfig.Builder builder)
- Specified by:
getConfig
in interfacecom.yahoo.vespa.config.content.FleetcontrollerConfig.Producer
-
getConfig
public void getConfig(com.yahoo.vespa.config.content.core.StorDistributormanagerConfig.Builder builder)
- Specified by:
getConfig
in interfacecom.yahoo.vespa.config.content.core.StorDistributormanagerConfig.Producer
-
distributionBits
public int distributionBits()
Returns the distribution bits this cluster should use. On Hosted Vespa this is hardcoded and not computed from the nodes because reducing the number of nodes is a common operation, while reducing the number of distribution bits can lead to consistency problems. This hardcoded value should work fine from 1-200 nodes. Those who have more will need to set this value in config and not remove it again if they reduce the node count.
-
isHosted
public boolean isHosted()
-
validate
public void validate() throws java.lang.Exception
Description copied from interface:ConfigProducer
check constraints depending on the state of the vespamodel graph. When overriding, you must invoke super.- Specified by:
validate
in interfaceConfigProducer
- Overrides:
validate
in classAbstractConfigProducer
- Throws:
java.lang.Exception
-
getMetricBuilder
public static com.yahoo.metrics.MetricsmanagerConfig.Consumer.Builder getMetricBuilder(java.lang.String name, com.yahoo.metrics.MetricsmanagerConfig.Builder builder)
-
getConfig
public void getConfig(com.yahoo.metrics.MetricsmanagerConfig.Builder builder)
- Specified by:
getConfig
in interfacecom.yahoo.metrics.MetricsmanagerConfig.Producer
-
clusterBucketSpaceConfigBuilder
public com.yahoo.vespa.config.content.AllClustersBucketSpacesConfig.Cluster.Builder clusterBucketSpaceConfigBuilder()
-
getConfig
public void getConfig(com.yahoo.vespa.config.content.core.BucketspacesConfig.Builder builder)
- Specified by:
getConfig
in interfacecom.yahoo.vespa.config.content.core.BucketspacesConfig.Producer
-
-