当前位置: 首页>>代码示例>>Java>>正文


Java RepositoriesModule类代码示例

本文整理汇总了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);
}
 
开发者ID:xushjie1987,项目名称:es-hadoop-v2.2.0,代码行数:22,代码来源:HdfsPlugin.java

示例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);
    }
}
 
开发者ID:jlinn,项目名称:elasticsearch-cloud-rackspace,代码行数:6,代码来源:CloudRackspacePlugin.java

示例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);
    }
}
 
开发者ID:kzwang,项目名称:elasticsearch-repository-gridfs,代码行数:6,代码来源:GridFsRepositoryPlugin.java

示例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);
    }
}
 
开发者ID:wikimedia,项目名称:search-repository-swift,代码行数:10,代码来源:SwiftRepositoryPlugin.java

示例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);
}
 
开发者ID:codelibs,项目名称:elasticsearch-repository-ssh,代码行数:6,代码来源:RepositorySshPlugin.java

示例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);
    }
}
 
开发者ID:mitallast,项目名称:elasticsearch-webdav-plugin,代码行数:6,代码来源:WebdavPlugin.java

示例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) {}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:Plugin.java


注:本文中的org.elasticsearch.repositories.RepositoriesModule类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。