The 4th line is the new line to add the plugin. It compiles and runs.
However, when the node starts, in the log, I did not see the plugin being installed in the plugin service, and nothing related to that plugin is shown.
My question is is this the right way to install plugin programmatically? And is there a way to verify the installation?
For the ES integration tests, what I found is it will create one index and move it after each test. This might take too much time for our particular use case. Is there a way we can only create one index and insert data once, and use it across all tests?
For the second one, it seems I need to be in the same "org.elasticsearch.node" package to create this MockNode class, while we are using ES as a dependency, and it is in a different package. So we cannot actually call super(settings, version, classpathPlugins); Is there a good way to resolve this issue?
It seems I am able to directly reference to MockNode in the test-jar. However when I do the same as
final Node node = new MockNode(settings, Version.CURRENT, Collections.singletonList(NativeScriptExamplesPlugin.class));
It seems Collections.singletonList(NativeScriptExamplesPlugin.class) does not compile with Collection<Class<? extends Plugin>>. Is there any particular jvm configurations I need to do?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.