Class NodeConfig

  • public class NodeConfig
    extends Object
    • 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.
        the NodeConfig
      • getConfigSetServiceClass

        public String getConfigSetServiceClass()
      • getNodeName

        public String getNodeName()
      • getCoreRootDirectory

        public Path getCoreRootDirectory()
      • getSolrDataHome

        public Path getSolrDataHome()
      • getSolrInstallDir

        public static Path getSolrInstallDir()
        Obtain the path of solr's binary installation directory, e.g. /opt/solr
        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:
      • getShardHandlerFactoryPluginInfo

        public PluginInfo getShardHandlerFactoryPluginInfo()
      • 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.
        a comma separated list of path strings or null if no paths defined
      • getCoreAdminHandlerClass

        public String getCoreAdminHandlerClass()
      • getCoreAdminHandlerActions

        public Map<String,​String> getCoreAdminHandlerActions()
      • 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()
      • getTransientCacheSize

        public int getTransientCacheSize()
      • getSolrProperties

        public Properties getSolrProperties()
      • getSolrHome

        public Path getSolrHome()
      • getBackupRepositoryPlugins

        public PluginInfo[] getBackupRepositoryPlugins()
      • getTracerConfiguratorPluginInfo

        public PluginInfo getTracerConfiguratorPluginInfo()
      • isFromZookeeper

        public boolean isFromZookeeper()
        True if this node config was loaded from zookeeper
        See Also:
      • 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
      • getAllowUrls

        public List<String> getAllowUrls()
        Allow-list of Solr nodes URLs.
      • 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