Package org.apache.solr.cloud
Class ZkSolrResourceLoader
java.lang.Object
org.apache.solr.core.SolrResourceLoader
org.apache.solr.cloud.ZkSolrResourceLoader
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.util.ResourceLoader,org.apache.solr.common.cloud.SolrClassLoader,SolrCoreAware
ResourceLoader that works with ZooKeeper.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.solr.core.SolrResourceLoader
SolrResourceLoader.SolrFileInputStream -
Field Summary
Fields inherited from class org.apache.solr.core.SolrResourceLoader
classLoader, SOLR_RESOURCELOADING_RESTRICTED_ENABLED_PARAM -
Constructor Summary
ConstructorsConstructorDescriptionZkSolrResourceLoader(Path instanceDir, String configSet, ClassLoader parent, ZkController zooKeeperController) This loader will first attempt to load resources from ZooKeeper, but if not found will delegate to the context classloader when possible, otherwise it will attempt to resolve resources using any jar files found in the "lib/" directory in the specified instance directory. -
Method Summary
Modifier and TypeMethodDescriptiongetZkResourceInfo(String resource) openResource(String resource) Opens any resource by its name.voidsetZkIndexSchemaReader(ZkIndexSchemaReader zkIndexSchemaReader) Methods inherited from class org.apache.solr.core.SolrResourceLoader
addToCoreAware, addToInfoBeans, addToResourceLoaderAware, assertAwareCompatibility, close, findClass, findClass, findClass, getClassLoader, getConfigPath, getCoreContainer, getFilteredURLs, getInfoMBeans, getInstancePath, getLines, getLines, getLines, getManagedResourceRegistry, getSchemaLoader, getSolrConfig, getURLs, getURLs, inform, inform, inform, informAware, newInstance, newInstance, newInstance, newInstance, persistConfLocally, resourceLocation, setCoreContainer, setSolrConfig, setSolrCore
-
Constructor Details
-
ZkSolrResourceLoader
public ZkSolrResourceLoader(Path instanceDir, String configSet, ClassLoader parent, ZkController zooKeeperController) This loader will first attempt to load resources from ZooKeeper, but if not found will delegate to the context classloader when possible, otherwise it will attempt to resolve resources using any jar files found in the "lib/" directory in the specified instance directory.
-
-
Method Details
-
getZkResourceInfo
-
openResource
Opens any resource by its name. By default, this will look in multiple locations to load the resource: $configDir/$resource from ZooKeeper. It will look for it in any jar accessible through the class loader if it cannot be found in ZooKeeper. Override this method to customize loading resources.- Specified by:
openResourcein interfaceorg.apache.lucene.util.ResourceLoader- Overrides:
openResourcein classSolrResourceLoader- Returns:
- the stream for the named resource
- Throws:
IOException
-
getConfigSetZkPath
-
getZkController
-
setZkIndexSchemaReader
-
getZkIndexSchemaReader
-