Package org.apache.solr.core
Class NodeConfig
- java.lang.Object
-
- org.apache.solr.core.NodeConfig
-
public class NodeConfig extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNodeConfig.NodeConfigBuilder
-
Field Summary
Fields Modifier and Type Field Description protected SolrResourceLoaderloaderstatic StringREDACTED_SYS_PROP_VALUEprotected PathsolrHomeprotected PropertiessolrProperties
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Path>getAllowPaths()Extra file paths that will be allowed for core creation, in addition to SOLR_HOME, SOLR_DATA_HOME and coreRootDirList<String>getAllowUrls()Allow-list of Solr nodes URLs.PluginInfo[]getBackupRepositoryPlugins()IntegergetBooleanQueryMaxClauseCount()If null, the lucene default will not be overriddenMap<String,CacheConfig>getCachesConfig()CloudConfiggetCloudConfig()PluginInfo[]getClusterPlugins()StringgetCollectionsHandlerClass()PathgetConfigSetBaseDirectory()Absolute.StringgetConfigSetServiceClass()StringgetConfigSetsHandlerClass()Map<String,String>getCoreAdminHandlerActions()StringgetCoreAdminHandlerClass()intgetCoreLoadThreadCount(boolean zkAware)PathgetCoreRootDirectory()Absolute.StringgetCoresLocatorClass()StringgetCoreSorterClass()StringgetDefaultZkHost()This method returns the default "zkHost" value for this node -- either read from the system properties, or from the "extra" properties configured explicitly on the SolrDispatchFilter; or null if not specified.StringgetHealthCheckHandlerClass()Set<String>getHiddenSysProps()Returns the list of hidden system properties.intgetIndexSearcherExecutorThreads()StringgetInfoHandlerClass()LogWatcherConfiggetLogWatcherConfig()StringgetManagementPath()MetricsConfiggetMetricsConfig()StringgetModules()Returns the modules as configured in solr.xml.StringgetNodeName()StringgetRedactedSysPropValue(String sysPropName)Returns the a system property value, or "--REDACTED--" if the system property is hiddenintgetReplayUpdatesThreads()PluginInfogetShardHandlerFactoryPluginInfo()StringgetSharedLibDirectory()Returns a directory, optionally a comma separated list of directories that will be added to Solr's class path for searching for classes and plugins.PathgetSolrDataHome()Absolute.PathgetSolrHome()static PathgetSolrInstallDir()Obtain the path of solr's binary installation directory, e.g.PropertiesgetSolrProperties()SolrResourceLoadergetSolrResourceLoader()PluginInfogetTracerConfiguratorPluginInfo()intgetTransientCacheSize()UpdateShardHandlerConfiggetUpdateShardHandlerConfig()booleanhasSchemaCache()booleanhideStackTraces()static voidinitModules(SolrResourceLoader loader, String modules)booleanisFromZookeeper()True if this node config was loaded from zookeeperbooleanisSysPropHidden(String sysPropName)Returns whether a given system property is hiddenstatic NodeConfigloadNodeConfig(Path solrHome, Properties nodeProperties)Get the NodeConfig whether stored on disk, in ZooKeeper, etc.
-
-
-
Field Detail
-
solrHome
protected final Path solrHome
-
loader
protected final SolrResourceLoader loader
-
solrProperties
protected final Properties solrProperties
-
REDACTED_SYS_PROP_VALUE
public static final String REDACTED_SYS_PROP_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
loadNodeConfig
public static NodeConfig loadNodeConfig(Path solrHome, Properties nodeProperties)
Get the NodeConfig whether stored on disk, in ZooKeeper, etc. This may also be used by custom filters to load relevant configuration.- Returns:
- the NodeConfig
-
getConfigSetServiceClass
public String getConfigSetServiceClass()
-
getNodeName
public String getNodeName()
-
getCoreRootDirectory
public Path getCoreRootDirectory()
Absolute.
-
getCoresLocatorClass
public String getCoresLocatorClass()
-
getCoreSorterClass
public String getCoreSorterClass()
-
getSolrDataHome
public Path getSolrDataHome()
Absolute.
-
getSolrInstallDir
public static Path getSolrInstallDir()
Obtain the path of solr's binary installation directory, e.g./opt/solr- Returns:
- path to install dir or null if solr.install.dir not set.
-
getBooleanQueryMaxClauseCount
public Integer getBooleanQueryMaxClauseCount()
If null, the lucene default will not be overridden- See Also:
IndexSearcher.setMaxClauseCount(int)
-
getShardHandlerFactoryPluginInfo
public PluginInfo getShardHandlerFactoryPluginInfo()
-
getUpdateShardHandlerConfig
public UpdateShardHandlerConfig getUpdateShardHandlerConfig()
-
getCoreLoadThreadCount
public int getCoreLoadThreadCount(boolean zkAware)
-
getReplayUpdatesThreads
public int getReplayUpdatesThreads()
-
getIndexSearcherExecutorThreads
public int getIndexSearcherExecutorThreads()
-
getSharedLibDirectory
public String getSharedLibDirectory()
Returns a directory, optionally a comma separated list of directories that will be added to Solr's class path for searching for classes and plugins. The path is either absolute or relative to SOLR_HOME. Note that SOLR_HOME/lib will always be added to the search path even if not included in this list.- Returns:
- a comma separated list of path strings or null if no paths defined
-
getCoreAdminHandlerClass
public String getCoreAdminHandlerClass()
-
getCollectionsHandlerClass
public String getCollectionsHandlerClass()
-
getHealthCheckHandlerClass
public String getHealthCheckHandlerClass()
-
getInfoHandlerClass
public String getInfoHandlerClass()
-
getConfigSetsHandlerClass
public String getConfigSetsHandlerClass()
-
hasSchemaCache
public boolean hasSchemaCache()
-
getManagementPath
public String getManagementPath()
-
getConfigSetBaseDirectory
public Path getConfigSetBaseDirectory()
Absolute.
-
getLogWatcherConfig
public LogWatcherConfig getLogWatcherConfig()
-
getCloudConfig
public CloudConfig getCloudConfig()
-
getTransientCacheSize
public int getTransientCacheSize()
-
getSolrProperties
public Properties getSolrProperties()
-
getSolrHome
public Path getSolrHome()
-
getSolrResourceLoader
public SolrResourceLoader getSolrResourceLoader()
-
getBackupRepositoryPlugins
public PluginInfo[] getBackupRepositoryPlugins()
-
getMetricsConfig
public MetricsConfig getMetricsConfig()
-
getCachesConfig
public Map<String,CacheConfig> getCachesConfig()
-
getTracerConfiguratorPluginInfo
public PluginInfo getTracerConfiguratorPluginInfo()
-
getClusterPlugins
public PluginInfo[] getClusterPlugins()
-
isFromZookeeper
public boolean isFromZookeeper()
True if this node config was loaded from zookeeper- See Also:
getDefaultZkHost()
-
getDefaultZkHost
public String getDefaultZkHost()
This method returns the default "zkHost" value for this node -- either read from the system properties, or from the "extra" properties configured explicitly on the SolrDispatchFilter; or null if not specified.This is the value that would have been used when attempting to locate the solr.xml in ZooKeeper (regardless of whether the file was actually loaded from ZK or from local disk)
(This value should only be used for "accounting" purposes to track where the node config came from if it was loaded from zk -- ie: to check if the chroot has already been applied. It may be different from the "zkHost" configured in the "cloud" section of the solr.xml, which should be used for all zk connections made by this node to participate in the cluster)
- See Also:
isFromZookeeper(),getCloudConfig(),CloudConfig.getZkHost()
-
getAllowPaths
public Set<Path> getAllowPaths()
Extra file paths that will be allowed for core creation, in addition to SOLR_HOME, SOLR_DATA_HOME and coreRootDir
-
hideStackTraces
public boolean hideStackTraces()
-
getModules
public String getModules()
Returns the modules as configured in solr.xml. Comma separated list. May be null if not defined
-
getHiddenSysProps
public Set<String> getHiddenSysProps()
Returns the list of hidden system properties. The list values are regex expressions
-
isSysPropHidden
public boolean isSysPropHidden(String sysPropName)
Returns whether a given system property is hidden
-
getRedactedSysPropValue
public String getRedactedSysPropValue(String sysPropName)
Returns the a system property value, or "--REDACTED--" if the system property is hidden
-
initModules
public static void initModules(SolrResourceLoader loader, String modules)
-
-