• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java BlobStoreIndexShardRepository类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository的典型用法代码示例。如果您正苦于以下问题:Java BlobStoreIndexShardRepository类的具体用法?Java BlobStoreIndexShardRepository怎么用?Java BlobStoreIndexShardRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BlobStoreIndexShardRepository类属于org.elasticsearch.index.snapshots.blobstore包,在下文中一共展示了BlobStoreIndexShardRepository类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onModule

import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository; //导入依赖的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: setUp

import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository; //导入依赖的package包/类
@Before
public void setUp(){
    indexShardRepository = mock(BlobStoreIndexShardRepository.class);
    cloudFilesService = mock(CloudFilesService.class);

    RegionScopedBlobStoreContext blobStoreContext = mock(RegionScopedBlobStoreContext.class);

    BlobStore blobStore = mock(BlobStore.class);
    Set<Location> locations = new HashSet<Location>();
    Set<String> isoCodes = new HashSet<String>();
    isoCodes.add("US-IL");
    locations.add(new LocationBuilder().id("ORD").description("ORD").scope(LocationScope.REGION).iso3166Codes(isoCodes).build());
    when(blobStore.listAssignableLocations()).thenReturn((Set) locations);

    when(blobStoreContext.getBlobStore(anyString())).thenReturn(blobStore);

    when(cloudFilesService.context()).thenReturn(blobStoreContext);
}
 
开发者ID:jlinn,项目名称:elasticsearch-cloud-rackspace,代码行数:19,代码来源:CloudFilesRepositoryTest.java


示例3: BlobStoreRepository

import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository; //导入依赖的package包/类
/**
 * Constructs new BlobStoreRepository
 *
 * @param repositoryName       repository name
 * @param repositorySettings   repository settings
 * @param indexShardRepository an instance of IndexShardRepository
 */
protected BlobStoreRepository(String repositoryName, RepositorySettings repositorySettings, IndexShardRepository indexShardRepository) {
    super(repositorySettings.globalSettings());
    this.repositoryName = repositoryName;
    this.indexShardRepository = (BlobStoreIndexShardRepository) indexShardRepository;
    snapshotRateLimiter = getRateLimiter(repositorySettings, "max_snapshot_bytes_per_sec", new ByteSizeValue(40, ByteSizeUnit.MB));
    restoreRateLimiter = getRateLimiter(repositorySettings, "max_restore_bytes_per_sec", new ByteSizeValue(40, ByteSizeUnit.MB));
    readOnly = repositorySettings.settings().getAsBoolean("readonly", false);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:16,代码来源:BlobStoreRepository.java


示例4: configure

import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository; //导入依赖的package包/类
/**
 * Do the binding.
 */
@Override
protected void configure() {
    bind(Repository.class).to(SwiftRepository.class).asEagerSingleton();
    bind(IndexShardRepository.class).to(BlobStoreIndexShardRepository.class).asEagerSingleton();
    bind(SwiftService.class).asEagerSingleton();
}
 
开发者ID:wikimedia,项目名称:search-repository-swift,代码行数:10,代码来源:SwiftRepositoryModule.java


示例5: configure

import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void configure() {
    bind(Repository.class).to(SshRepository.class).asEagerSingleton();
    bind(IndexShardRepository.class)
            .to(BlobStoreIndexShardRepository.class).asEagerSingleton();
}
 
开发者ID:codelibs,项目名称:elasticsearch-repository-ssh,代码行数:10,代码来源:SshRepositoryModule.java


示例6: RepositoriesModule

import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository; //导入依赖的package包/类
public RepositoriesModule() {
    registerRepository(FsRepository.TYPE, FsRepository.class, BlobStoreIndexShardRepository.class);
    registerRepository(URLRepository.TYPE, URLRepository.class, BlobStoreIndexShardRepository.class);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:5,代码来源:RepositoriesModule.java


示例7: configure

import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository; //导入依赖的package包/类
@Override
protected void configure() {
    bind(Repository.class).to(CloudFilesRepository.class).asEagerSingleton();
    bind(IndexShardRepository.class).to(BlobStoreIndexShardRepository.class).asEagerSingleton();
}
 
开发者ID:jlinn,项目名称:elasticsearch-cloud-rackspace,代码行数:6,代码来源:CloudFilesRepositoryModule.java


示例8: configure

import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository; //导入依赖的package包/类
@Override
protected void configure() {
    bind(Repository.class).to(GridFsRepository.class).asEagerSingleton();
    bind(IndexShardRepository.class).to(BlobStoreIndexShardRepository.class).asEagerSingleton();
}
 
开发者ID:kzwang,项目名称:elasticsearch-repository-gridfs,代码行数:6,代码来源:GridFsRepositoryModule.java


示例9: onModule

import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository; //导入依赖的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


示例10: onModule

import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository; //导入依赖的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


示例11: configure

import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository; //导入依赖的package包/类
@Override
protected void configure() {
    bind(WebdavService.class).to(getWebdavServiceClass()).asEagerSingleton();
    bind(Repository.class).to(WebdavRepository.class).asEagerSingleton();
    bind(IndexShardRepository.class).to(BlobStoreIndexShardRepository.class).asEagerSingleton();
}
 
开发者ID:mitallast,项目名称:elasticsearch-webdav-plugin,代码行数:7,代码来源:WebdavRepositoryModule.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CreatedListEntry类代码示例发布时间:2022-05-22
下一篇:
Java Callback类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap