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


Java ReindexPlugin类代码示例

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


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

示例1: testInstallPluginTwice

import org.elasticsearch.index.reindex.ReindexPlugin; //导入依赖的package包/类
@Test
public void testInstallPluginTwice() {
    for (Class<? extends Plugin> plugin : Arrays.asList(ReindexPlugin.class, PercolatorPlugin.class, MustachePlugin.class)) {
        try {
            new PreBuiltTransportClient(Settings.EMPTY, plugin);
            fail("exception expected");
        } catch (IllegalArgumentException ex) {
            assertTrue("Expected message to start with [plugin already exists: ] but was instead [" + ex.getMessage() + "]",
                    ex.getMessage().startsWith("plugin already exists: "));
        }
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:PreBuiltTransportClientTests.java

示例2: startCluster

import org.elasticsearch.index.reindex.ReindexPlugin; //导入依赖的package包/类
public final ClusterInfo startCluster(final NodeSettingsSupplier nodeSettingsSupplier, ClusterConfiguration clusterConfiguration, int timeout, Integer nodes)
		throws Exception {
    
	if (!esNodes.isEmpty()) {
		throw new RuntimeException("There are still " + esNodes.size() + " nodes instantiated, close them first.");
	}

	FileUtils.deleteDirectory(new File("data/"+clustername));

	List<NodeSettings> internalNodeSettings = clusterConfiguration.getNodeSettings();

	for (int i = 0; i < internalNodeSettings.size(); i++) {
		NodeSettings setting = internalNodeSettings.get(i);
		
		Node node = new PluginAwareNode(
				getMinimumNonSgNodeSettingsBuilder(i, setting.masterNode, setting.dataNode, setting.tribeNode, internalNodeSettings.size(), clusterConfiguration.getMasterNodes())
						.put(nodeSettingsSupplier == null ? Settings.Builder.EMPTY_SETTINGS : nodeSettingsSupplier.get(i)).build(),
				Netty4Plugin.class, SearchGuardPlugin.class, MatrixAggregationPlugin.class, MustachePlugin.class, ParentJoinPlugin.class, PercolatorPlugin.class, ReindexPlugin.class);
		System.out.println(node.settings());
		node.start();
		esNodes.add(node);
		Thread.sleep(200);
	}
	ClusterInfo cInfo = waitForCluster(ClusterHealthStatus.GREEN, TimeValue.timeValueSeconds(timeout), nodes == null?esNodes.size():nodes.intValue());
	cInfo.numNodes = internalNodeSettings.size();
	cInfo.clustername = clustername;
	return cInfo;
}
 
开发者ID:floragunncom,项目名称:search-guard,代码行数:29,代码来源:ClusterHelper.java


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