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 StringSOLR_DATA_HOMEstatic StringSOLR_XML_FILEstatic StringZK_HOST
-
Constructor Summary
Constructors Constructor Description SolrXmlConfig()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NodeConfigfromConfig(Path solrHome, Properties substituteProperties, boolean fromZookeeper, org.apache.solr.common.ConfigNode root, SolrResourceLoader loader)static NodeConfigfromFile(Path solrHome, Path configFile, Properties substituteProps)static NodeConfigfromInputStream(Path solrHome, InputStream is, Properties substituteProps)static NodeConfigfromInputStream(Path solrHome, InputStream is, Properties substituteProps, boolean fromZookeeper)static NodeConfigfromSolrHome(Path solrHome, Properties substituteProps)static NodeConfigfromString(Path solrHome, String xml)TEST-ONLYstatic PropertieswrapAndSetZkHostFromSysPropIfNeeded(Properties props)Given some node Properties, checks if non-null and a 'zkHost' is alread 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 alread 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 corispond System property (if set)In theory we only need this logic once, ideally in SolrDispatchFilter, but we put it here to re-use redundently 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)
-
-