MCPcopy Create free account
hub / github.com/apache/solr / CoreDescriptor

Class CoreDescriptor

solr/core/src/java/org/apache/solr/core/CoreDescriptor.java:47–379  ·  view source on GitHub ↗

Metadata about a SolrCore. It's mostly loaded from a file on disk at the very beginning of loading a core. It's mostly but not completely immutable; we should fix this! @since solr 1.3

Source from the content-addressed store, hash-verified

45 * @since solr 1.3
46 */
47public class CoreDescriptor {
48 private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
49 // Properties file name constants
50 public static final String CORE_NAME = "name";
51 public static final String CORE_CONFIG = "config";
52 public static final String CORE_DATADIR = "dataDir";
53 public static final String CORE_ULOGDIR = "ulogDir";
54 public static final String CORE_SCHEMA = "schema";
55 public static final String CORE_SHARD = "shard";
56 public static final String CORE_COLLECTION = "collection";
57 public static final String CORE_PROPERTIES = "properties";
58 public static final String CORE_LOADONSTARTUP = "loadOnStartup";
59 public static final String CORE_NODE_NAME = "coreNodeName";
60 public static final String CORE_CONFIGSET = "configSet";
61 public static final String CORE_CONFIGSET_PROPERTIES = "configSetProperties";
62 public static final String SOLR_CORE_PROP_PREFIX = "solr.core.";
63
64 /**
65 * Get the standard properties in persistable form
66 *
67 * @return the standard core properties in persistable form
68 */
69 public Properties getPersistableStandardProperties() {
70 return originalCoreProperties;
71 }
72
73 /**
74 * Get user-defined core properties in persistable form
75 *
76 * @return user-defined core properties in persistable form
77 */
78 public Properties getPersistableUserProperties() {
79 return originalExtraProperties;
80 }
81
82 private static final Map<String, String> defaultProperties =
83 Map.of(
84 CORE_CONFIG, "solrconfig.xml",
85 CORE_SCHEMA, "schema.xml",
86 CORE_CONFIGSET_PROPERTIES, ConfigSetProperties.DEFAULT_FILENAME,
87 CORE_DATADIR, "data" + FileSystems.getDefault().getSeparator(),
88 CORE_LOADONSTARTUP, "true");
89
90 private static final List<String> requiredProperties = List.of(CORE_NAME);
91
92 public static List<String> standardPropNames =
93 List.of(
94 CORE_NAME,
95 CORE_CONFIG,
96 CORE_DATADIR,
97 CORE_ULOGDIR,
98 CORE_SCHEMA,
99 CORE_PROPERTIES,
100 CORE_CONFIGSET_PROPERTIES,
101 CORE_LOADONSTARTUP,
102 CORE_CONFIGSET,
103 // cloud props
104 CORE_SHARD,

Callers

nothing calls this directly

Calls 3

lookupMethod · 0.45
ofMethod · 0.45
getDefaultMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…