本文整理汇总了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: "));
}
}
}
示例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;
}