public class CoreDescriptor extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CORE_ABS_INSTDIR |
static String |
CORE_COLLECTION |
static String |
CORE_CONFIG |
static String |
CORE_CONFIGSET |
static String |
CORE_DATADIR |
static String |
CORE_INSTDIR |
static String |
CORE_LOADONSTARTUP |
static String |
CORE_NAME |
static String |
CORE_NODE_NAME |
static String |
CORE_PROPERTIES |
static String |
CORE_ROLES |
static String |
CORE_SCHEMA |
static String |
CORE_SHARD |
static String |
CORE_TRANSIENT |
static String |
CORE_ULOGDIR |
protected Properties |
coreProperties
The properties for this core, as available through getProperty()
|
static String |
DEFAULT_EXTERNAL_PROPERTIES_FILE |
protected Properties |
originalCoreProperties
The original standard core properties, before substitution
|
protected Properties |
originalExtraProperties
The original extra core properties, before substitution
|
static String |
SOLR_CORE_PROP_PREFIX |
static com.google.common.collect.ImmutableList<String> |
standardPropNames |
protected Properties |
substitutableProperties
The properties for this core, substitutable by resource loaders
|
Constructor and Description |
---|
CoreDescriptor(CoreContainer container,
String name,
String instanceDir)
Create a new CoreDescriptor with a given name and instancedir
|
CoreDescriptor(CoreContainer container,
String name,
String instanceDir,
Properties coreProps)
Create a new CoreDescriptor.
|
CoreDescriptor(CoreContainer container,
String name,
String instanceDir,
Properties coreProps,
SolrParams params)
Create a new CoreDescriptor.
|
CoreDescriptor(CoreContainer container,
String name,
String instanceDir,
String... properties) |
CoreDescriptor(String coreName,
CoreDescriptor other)
Create a new CoreDescriptor using the properties of an existing one
|
Modifier and Type | Method and Description |
---|---|
protected void |
buildSubstitutableProperties()
Create the properties object used by resource loaders, etc, for property
substitution.
|
static String |
checkPropertyIsNotEmpty(String value,
String propName) |
CloudDescriptor |
getCloudDescriptor() |
String |
getCollectionName() |
String |
getConfigName() |
String |
getConfigSet() |
CoreContainer |
getCoreContainer() |
String |
getCoreProperty(String prop,
String defVal)
Returns a specific property defined on this CoreDescriptor
|
String |
getDataDir() |
String |
getInstanceDir() |
String |
getName() |
Properties |
getPersistableStandardProperties()
Get the standard properties in persistable form
|
Properties |
getPersistableUserProperties()
Get user-defined core properties in persistable form
|
String |
getPropertiesName() |
String |
getRawInstanceDir() |
String |
getSchemaName() |
Properties |
getSubstitutableProperties()
Returns all substitutable properties defined on this CoreDescriptor
|
String |
getUlogDir() |
boolean |
isLoadOnStartup() |
boolean |
isTransient() |
protected static boolean |
isUserDefinedProperty(String propName)
Is this property a Solr-standard property, or is it an extra property
defined per-core by the user?
|
protected void |
loadExtraProperties()
Load properties specified in an external properties file.
|
protected File |
resolvePaths(String filepath) |
String |
toString() |
boolean |
usingDefaultDataDir() |
public static final String CORE_NAME
public static final String CORE_CONFIG
public static final String CORE_INSTDIR
public static final String CORE_ABS_INSTDIR
public static final String CORE_DATADIR
public static final String CORE_ULOGDIR
public static final String CORE_SCHEMA
public static final String CORE_SHARD
public static final String CORE_COLLECTION
public static final String CORE_ROLES
public static final String CORE_PROPERTIES
public static final String CORE_LOADONSTARTUP
public static final String CORE_TRANSIENT
public static final String CORE_NODE_NAME
public static final String CORE_CONFIGSET
public static final String SOLR_CORE_PROP_PREFIX
public static final String DEFAULT_EXTERNAL_PROPERTIES_FILE
public static com.google.common.collect.ImmutableList<String> standardPropNames
protected final Properties originalCoreProperties
protected final Properties originalExtraProperties
protected final Properties coreProperties
protected final Properties substitutableProperties
public CoreDescriptor(CoreContainer container, String name, String instanceDir, Properties coreProps)
container
- the CoreDescriptor's containername
- the CoreDescriptor's nameinstanceDir
- a String containing the instanceDircoreProps
- a Properties object of the properties for this corepublic CoreDescriptor(CoreContainer container, String name, String instanceDir, String... properties)
public CoreDescriptor(CoreContainer container, String name, String instanceDir, Properties coreProps, SolrParams params)
container
- the CoreDescriptor's containername
- the CoreDescriptor's nameinstanceDir
- a String containing the instanceDircoreProps
- a Properties object of the properties for this coreparams
- additional paramspublic CoreDescriptor(CoreContainer container, String name, String instanceDir)
container
- the CoreDescriptor's containername
- the CoreDescriptor's nameinstanceDir
- the CoreDescriptor's instancedirpublic CoreDescriptor(String coreName, CoreDescriptor other)
coreName
- the new CoreDescriptor's nameother
- the CoreDescriptor to copypublic Properties getPersistableStandardProperties()
public Properties getPersistableUserProperties()
protected void loadExtraProperties()
properties
property on
the original Properties object used to create this CoreDescriptor. If
this has not been set, then we look for conf/solrcore.properties
underneath the instance dir.
File paths are taken as read from the core's instance directory
if they are not absolute.protected void buildSubstitutableProperties()
protected static boolean isUserDefinedProperty(String propName)
propName
- the Property namepublic String getPropertiesName()
public String getDataDir()
public boolean usingDefaultDataDir()
public String getRawInstanceDir()
public String getInstanceDir()
public String getConfigName()
public String getSchemaName()
public String getName()
public String getCollectionName()
public CoreContainer getCoreContainer()
public CloudDescriptor getCloudDescriptor()
public boolean isLoadOnStartup()
public boolean isTransient()
public String getUlogDir()
public String getCoreProperty(String prop, String defVal)
prop
- - value to read from the properties structure.defVal
- - return if no property found.public Properties getSubstitutableProperties()
public String getConfigSet()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.