Package org.apache.solr.core
Class SolrXmlConfig
- java.lang.Object
-
- org.apache.solr.core.SolrXmlConfig
-
public class SolrXmlConfig extends Object
Loadssolr.xml
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
SOLR_DATA_HOME
static String
SOLR_XML_FILE
static String
ZK_HOST
-
Constructor Summary
Constructors Constructor Description SolrXmlConfig()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NodeConfig
fromConfig(Path solrHome, Properties substituteProperties, boolean fromZookeeper, org.apache.solr.common.ConfigNode root, SolrResourceLoader loader)
static NodeConfig
fromFile(Path solrHome, Path configFile, Properties substituteProps)
static NodeConfig
fromInputStream(Path solrHome, InputStream is, Properties substituteProps)
static NodeConfig
fromInputStream(Path solrHome, InputStream is, Properties substituteProps, boolean fromZookeeper)
static NodeConfig
fromSolrHome(Path solrHome, Properties substituteProps)
static NodeConfig
fromString(Path solrHome, String xml)
TEST-ONLYstatic Properties
wrapAndSetZkHostFromSysPropIfNeeded(Properties props)
Given some node Properties, checks if non-null and a 'zkHost' is already included.
-
-
-
Field Detail
-
ZK_HOST
public static final String ZK_HOST
- See Also:
- Constant Field Values
-
SOLR_XML_FILE
public static final String SOLR_XML_FILE
- See Also:
- Constant Field Values
-
SOLR_DATA_HOME
public static final String SOLR_DATA_HOME
- See Also:
- Constant Field Values
-
-
Method Detail
-
wrapAndSetZkHostFromSysPropIfNeeded
public static Properties wrapAndSetZkHostFromSysPropIfNeeded(Properties props)
Given some node Properties, checks if non-null and a 'zkHost' is already included. If so, the Properties are returned as is. If not, then the returned value will be a new Properties, wrapping the original Properties, with the 'zkHost' value set based on the value of the corresponding System property (if set)In theory we only need this logic once, ideally in SolrDispatchFilter, but we put it here to re-use redundantly because of how much surface area our API has for various tests to poke at us.
-
fromConfig
public static NodeConfig fromConfig(Path solrHome, Properties substituteProperties, boolean fromZookeeper, org.apache.solr.common.ConfigNode root, SolrResourceLoader loader)
-
fromFile
public static NodeConfig fromFile(Path solrHome, Path configFile, Properties substituteProps)
-
fromString
public static NodeConfig fromString(Path solrHome, String xml)
TEST-ONLY
-
fromInputStream
public static NodeConfig fromInputStream(Path solrHome, InputStream is, Properties substituteProps)
-
fromInputStream
public static NodeConfig fromInputStream(Path solrHome, InputStream is, Properties substituteProps, boolean fromZookeeper)
-
fromSolrHome
public static NodeConfig fromSolrHome(Path solrHome, Properties substituteProps)
-
-