本文整理汇总了Java中org.elasticsearch.repositories.RepositoriesModule类的典型用法代码示例。如果您正苦于以下问题:Java RepositoriesModule类的具体用法?Java RepositoriesModule怎么用?Java RepositoriesModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RepositoriesModule类属于org.elasticsearch.repositories包,在下文中一共展示了RepositoriesModule类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onModule
import org.elasticsearch.repositories.RepositoriesModule; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void onModule(RepositoriesModule repositoriesModule) {
if (System.getSecurityManager() != null) {
Loggers.getLogger(HdfsPlugin.class).warn("The Java Security Manager is enabled however Hadoop is not compatible with it and thus needs to be disabled; see the docs for more information...");
}
String baseLib = detectLibFolder();
List<URL> cp = getHadoopClassLoaderPath(baseLib);
ClassLoader hadoopCL = URLClassLoader.newInstance(cp.toArray(new URL[cp.size()]), getClass().getClassLoader());
Class<? extends Repository> repository = null;
try {
repository = (Class<? extends Repository>) hadoopCL.loadClass("org.elasticsearch.repositories.hdfs.HdfsRepository");
} catch (ClassNotFoundException cnfe) {
throw new IllegalStateException("Cannot load plugin class; is the plugin class setup correctly?", cnfe);
}
repositoriesModule.registerRepository("hdfs", repository, BlobStoreIndexShardRepository.class);
Loggers.getLogger(HdfsPlugin.class).info("Loaded Hadoop [{}] libraries from {}", getHadoopVersion(hadoopCL), baseLib);
}
示例2: onModule
import org.elasticsearch.repositories.RepositoriesModule; //导入依赖的package包/类
public void onModule(RepositoriesModule repositoriesModule){
if(settings.getAsBoolean("rackspace.enabled", true)){
repositoriesModule.registerRepository(CloudFilesRepository.TYPE, CloudFilesRepositoryModule.class);
}
}
示例3: onModule
import org.elasticsearch.repositories.RepositoriesModule; //导入依赖的package包/类
public void onModule(RepositoriesModule repositoriesModule) {
if (settings.getAsBoolean("gridfs.repository.enabled", true)) {
repositoriesModule.registerRepository(GridFsRepository.TYPE, GridFsRepositoryModule.class);
}
}
示例4: onModule
import org.elasticsearch.repositories.RepositoriesModule; //导入依赖的package包/类
/**
* Load our repository module into the list, if enabled
* @param repositoriesModule The repositories module to register ourselves with
*/
public void onModule(RepositoriesModule repositoriesModule) {
if (settings.getAsBoolean("swift.repository.enabled", true)) {
repositoriesModule.registerRepository(SwiftRepository.TYPE, SwiftRepository.class, BlobStoreIndexShardRepository.class);
}
}
示例5: onModule
import org.elasticsearch.repositories.RepositoriesModule; //导入依赖的package包/类
public void onModule(RepositoriesModule repositoriesModule) {
Loggers.getLogger(RepositorySshPlugin.class).info("trying to register repository-ssh...");
repositoriesModule.registerRepository(SshRepository.TYPE, SshRepository.class,
BlobStoreIndexShardRepository.class);
}
示例6: onModule
import org.elasticsearch.repositories.RepositoriesModule; //导入依赖的package包/类
public void onModule(RepositoriesModule repositoriesModule) {
if (settings.getAsBoolean("cloud.enabled", true)) {
repositoriesModule.registerRepository(WebdavRepository.TYPE, WebdavRepositoryModule.class);
}
}
示例7: onModule
import org.elasticsearch.repositories.RepositoriesModule; //导入依赖的package包/类
/**
* Old-style snapshot/restore extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
* from 2.x.
*
* @deprecated implement {@link RepositoryPlugin} instead
*/
@Deprecated
public final void onModule(RepositoriesModule module) {}