Package org.apache.solr.core
Class ConfigSetService
- java.lang.Object
-
- org.apache.solr.core.ConfigSetService
-
- Direct Known Subclasses:
CloudConfigSetService
,ConfigSetService.Standalone
public abstract class ConfigSetService extends Object
Service class used by the CoreContainer to load ConfigSets for use in SolrCore creation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConfigSetService.Standalone
The Solr standalone version of ConfigSetService.
-
Field Summary
Fields Modifier and Type Field Description protected SolrResourceLoader
parentLoader
-
Constructor Summary
Constructors Constructor Description ConfigSetService(SolrResourceLoader loader, boolean shareSchema)
Create a new ConfigSetService
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
configSetName(CoreDescriptor cd)
Return a name for the ConfigSet for a core to be used for printing/diagnostic purposes.static ConfigSetService
createConfigSetService(NodeConfig nodeConfig, SolrResourceLoader loader, ZkController zkController)
protected abstract SolrResourceLoader
createCoreResourceLoader(CoreDescriptor cd)
Create a SolrResourceLoader for a coreprotected IndexSchema
createIndexSchema(CoreDescriptor cd, SolrConfig solrConfig)
Create an IndexSchema object for a core.protected SolrConfig
createSolrConfig(CoreDescriptor cd, SolrResourceLoader loader, boolean isTrusted)
Create a SolrConfig object for a coreprotected abstract Long
getCurrentSchemaModificationVersion(String configSet, SolrConfig solrConfig, String schemaFile)
Returns a modification version for the schema file.ConfigSet
loadConfigSet(CoreDescriptor dcore)
Load the ConfigSet for a coreprotected NamedList
loadConfigSetFlags(CoreDescriptor cd, SolrResourceLoader loader)
Return the ConfigSet flags or null if none.protected NamedList
loadConfigSetProperties(CoreDescriptor cd, SolrResourceLoader loader)
Return the ConfigSet properties or null if none.
-
-
-
Field Detail
-
parentLoader
protected final SolrResourceLoader parentLoader
-
-
Constructor Detail
-
ConfigSetService
public ConfigSetService(SolrResourceLoader loader, boolean shareSchema)
Create a new ConfigSetService- Parameters:
loader
- the CoreContainer's resource loadershareSchema
- should we share the IndexSchema among cores of same config?
-
-
Method Detail
-
createConfigSetService
public static ConfigSetService createConfigSetService(NodeConfig nodeConfig, SolrResourceLoader loader, ZkController zkController)
-
loadConfigSet
public final ConfigSet loadConfigSet(CoreDescriptor dcore)
Load the ConfigSet for a core- Parameters:
dcore
- the core's CoreDescriptor- Returns:
- a ConfigSet
-
createSolrConfig
protected SolrConfig createSolrConfig(CoreDescriptor cd, SolrResourceLoader loader, boolean isTrusted)
Create a SolrConfig object for a core- Parameters:
cd
- the core's CoreDescriptorloader
- the core's resource loaderisTrusted
- is the configset trusted?- Returns:
- a SolrConfig object
-
createIndexSchema
protected IndexSchema createIndexSchema(CoreDescriptor cd, SolrConfig solrConfig)
Create an IndexSchema object for a core. It might be a cached lookup.- Parameters:
cd
- the core's CoreDescriptorsolrConfig
- the core's SolrConfig- Returns:
- an IndexSchema
-
getCurrentSchemaModificationVersion
protected abstract Long getCurrentSchemaModificationVersion(String configSet, SolrConfig solrConfig, String schemaFile)
Returns a modification version for the schema file. Null may be returned if not known, and if so it defeats schema caching.
-
loadConfigSetProperties
protected NamedList loadConfigSetProperties(CoreDescriptor cd, SolrResourceLoader loader)
Return the ConfigSet properties or null if none.- Parameters:
cd
- the core's CoreDescriptorloader
- the core's resource loader- Returns:
- the ConfigSet properties
- See Also:
ConfigSetProperties
-
loadConfigSetFlags
protected NamedList loadConfigSetFlags(CoreDescriptor cd, SolrResourceLoader loader)
Return the ConfigSet flags or null if none.
-
createCoreResourceLoader
protected abstract SolrResourceLoader createCoreResourceLoader(CoreDescriptor cd)
Create a SolrResourceLoader for a core- Parameters:
cd
- the core's CoreDescriptor- Returns:
- a SolrResourceLoader
-
configSetName
public abstract String configSetName(CoreDescriptor cd)
Return a name for the ConfigSet for a core to be used for printing/diagnostic purposes.- Parameters:
cd
- the core's CoreDescriptor- Returns:
- a name for the core's ConfigSet
-
-