Start Elasticsearch in a Java process

Is it possible I can start/stop Elasticsearch within a Java process? The firm has an infra that can quickly manage any Java process start/stop and also monitor log.

org.elasticsearch.client.Node node = new Node(...)
node.start()
...
node.stop()

I'm not sure if the command line is the best option to manage an Elasticsearch node in production env.

Thanks,
Jun

No, this is no longer supported. See this blog post for more information.

You can start a Node though using Docker from Java. See https://www.testcontainers.org/usage/elasticsearch_container.html

Not sure it helps.

This looks very interesting. I'll certainly try this out. Many thanks David.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.