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
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 overriddenCloudConfig
getCloudConfig()
String
getCollectionsHandlerClass()
Path
getConfigSetBaseDirectory()
Absolute.String
getConfigSetServiceClass()
String
getConfigSetsHandlerClass()
Map<String,String>
getCoreAdminHandlerActions()
String
getCoreAdminHandlerClass()
int
getCoreLoadThreadCount(boolean zkAware)
Path
getCoreRootDirectory()
Absolute.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()
String
getInfoHandlerClass()
LogWatcherConfig
getLogWatcherConfig()
String
getManagementPath()
MetricsConfig
getMetricsConfig()
String
getModules()
Returns the modules as configured in solr.xml.String
getNodeName()
int
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()
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
isFromZookeeper()
True if this node config was loaded from zookeeperstatic 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
-
-
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.
-
getSolrDataHome
public Path getSolrDataHome()
Absolute.
-
getSolrInstallDir
public 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()
-
getTracerConfiguratorPluginInfo
public PluginInfo getTracerConfiguratorPluginInfo()
-
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 locate the solr.xml in ZooKeeper (regardless of wether the file was actaully 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
-
getModules
public String getModules()
Returns the modules as configured in solr.xml. Comma separated list. May be null if not defined
-
-