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 class
NodeConfig.NodeConfigBuilder
-
Field Summary
Fields Modifier and Type Field Description protected SolrResourceLoader
loader
static String
REDACTED_SYS_PROP_VALUE
protected Path
solrHome
protected Properties
solrProperties
-
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()
Integer
getBooleanQueryMaxClauseCount()
If null, the lucene default will not be overriddenMap<String,CacheConfig>
getCachesConfig()
CloudConfig
getCloudConfig()
PluginInfo[]
getClusterPlugins()
String
getCollectionsHandlerClass()
Path
getConfigSetBaseDirectory()
Absolute.String
getConfigSetServiceClass()
String
getConfigSetsHandlerClass()
Map<String,String>
getCoreAdminHandlerActions()
String
getCoreAdminHandlerClass()
int
getCoreLoadThreadCount(boolean zkAware)
Path
getCoreRootDirectory()
Absolute.String
getCoresLocatorClass()
String
getCoreSorterClass()
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.String
getHealthCheckHandlerClass()
Set<String>
getHiddenSysProps()
Returns the list of hidden system properties.String
getInfoHandlerClass()
LogWatcherConfig
getLogWatcherConfig()
String
getManagementPath()
MetricsConfig
getMetricsConfig()
String
getModules()
Returns the modules as configured in solr.xml.String
getNodeName()
String
getRedactedSysPropValue(String sysPropName)
Returns the a system property value, or "--REDACTED--" if the system property is hiddenint
getReplayUpdatesThreads()
PluginInfo
getShardHandlerFactoryPluginInfo()
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.Path
getSolrDataHome()
Absolute.Path
getSolrHome()
static Path
getSolrInstallDir()
Obtain the path of solr's binary installation directory, e.g.Properties
getSolrProperties()
SolrResourceLoader
getSolrResourceLoader()
PluginInfo
getTracerConfiguratorPluginInfo()
int
getTransientCacheSize()
UpdateShardHandlerConfig
getUpdateShardHandlerConfig()
boolean
hasSchemaCache()
boolean
hideStackTraces()
static void
initModules(SolrResourceLoader loader, String modules)
boolean
isFromZookeeper()
True if this node config was loaded from zookeeperboolean
isSysPropHidden(String sysPropName)
Returns whether a given system property is hiddenstatic NodeConfig
loadNodeConfig(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()
-
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)
-
-