Suggested way to shutdownElastic Search cluster in 2.1from client application

We have a need to shutdown the ElasticSearch cluster from my client application - installed on different machine . We achieved this functionality using shutdown API in 1.6 which is no longer available from2.0. I'm wondering if there is any suggested way to achieve the same in 2.0:we are considering using the JMX or ES plugin. Please suggest.

My suggestion is to use the standard process mechanics for your deploy. For most people that means a human taking action with systemd or the init script.

If your application runs Elasticsearch all on its own then it should keep a reference to the process it forked and it should kill it.

Why is that?

The primary reason is BWC - we used to support before. Another reason is that we have many ES nodes running on different machines and we want a centralized mechanism to shutdown them.

No Elastic Search runs independently on different machines. Basically we are looking for a centralized mechanism to shutdown all the nodes - preferably from our application.