# Node shutdown

**URL:** <https://discuss.elastic.co/t/node-shutdown/14465>\
**Category:** Elasticsearch\
**Created:** [November 19, 2013, 10:46am UTC](https://discuss.elastic.co/t/node-shutdown/14465 "2013-11-19T10:46:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_Verlangen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robin_verlangen/32/1542_2.png) [@Robin\_Verlangen](https://discuss.elastic.co/u/Robin_Verlangen)\
**Post date:** [November 19, 2013, 10:46am UTC](https://discuss.elastic.co/t/node-shutdown/14465/1 "2013-11-19T10:46:23Z")

</div>

Hi there,

I have a question regarding this API:  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-shutdown.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-shutdown.html)

I have been browsing to the source code:

- NodesShutdownAction.java[https://github.com/elasticsearch/elasticsearch/blob/f9ce791578ff103ce9af89fca1394513bc0150f7/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/NodesShutdownAction.java](https://github.com/elasticsearch/elasticsearch/blob/f9ce791578ff103ce9af89fca1394513bc0150f7/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/NodesShutdownAction.java)
- NodesShutdownRequest.java[https://github.com/elasticsearch/elasticsearch/blob/f9ce791578ff103ce9af89fca1394513bc0150f7/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/NodesShutdownRequest.java](https://github.com/elasticsearch/elasticsearch/blob/f9ce791578ff103ce9af89fca1394513bc0150f7/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/NodesShutdownRequest.java)

This does not provide the shutdown sequence I was looking for. E.g.

1. stop search request handlers
2. drain data to other cluster nodes
3. etc.

What does _exactly_ happen when this command is executed on a certain node?  
Thank you!

Best regards,

Robin Verlangen  
_Chief Data Architect_

W [http://www.robinverlangen.nl](http://www.robinverlangen.nl)  
E robin@us2.nl

[http://goo.gl/Lt7BC](http://goo.gl/Lt7BC)  
_What is CloudPelican? [http://goo.gl/HkB3D](http://goo.gl/HkB3D)_

Disclaimer: The information contained in this message and attachments is  
intended solely for the attention and use of the named addressee and may be  
confidential. If you are not the intended recipient, you are reminded that  
the information remains the property of the sender. You must not use,  
disclose, distribute, copy, print or rely on this e-mail. If you have  
received this message in error, please contact the sender immediately and  
irrevocably delete this message and any copies.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [November 21, 2013, 9:08am UTC](https://discuss.elastic.co/t/node-shutdown/14465/2 "2013-11-21T09:08:37Z")

</div>

Hey,

the more interesting class to look at might be  
[https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/TransportNodesShutdownAction.java](https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/TransportNodesShutdownAction.java)

Depending on how this action is called, either the whole cluster or number  
of nodes is shut down. At the end of the day, a node.close() call is  
executed, if the node where the action is running on, should be shutdown.

Hope this helps...

--Alex

On Tue, Nov 19, 2013 at 11:46 AM, Robin Verlangen [robin@us2.nl](mailto:robin@us2.nl) wrote:

> Hi there,
> 
> I have a question regarding this API:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-shutdown.html)
> 
> I have been browsing to the source code:
> 
> - NodesShutdownAction.java[https://github.com/elasticsearch/elasticsearch/blob/f9ce791578ff103ce9af89fca1394513bc0150f7/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/NodesShutdownAction.java](https://github.com/elasticsearch/elasticsearch/blob/f9ce791578ff103ce9af89fca1394513bc0150f7/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/NodesShutdownAction.java)
> - NodesShutdownRequest.java[https://github.com/elasticsearch/elasticsearch/blob/f9ce791578ff103ce9af89fca1394513bc0150f7/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/NodesShutdownRequest.java](https://github.com/elasticsearch/elasticsearch/blob/f9ce791578ff103ce9af89fca1394513bc0150f7/src/main/java/org/elasticsearch/action/admin/cluster/node/shutdown/NodesShutdownRequest.java)
> 
> This does not provide the shutdown sequence I was looking for. E.g.
> 
> 1. stop search request handlers
> 2. drain data to other cluster nodes
> 3. etc.
> 
> What does _exactly_ happen when this command is executed on a certain  
> node?  
> Thank you!
> 
> Best regards,
> 
> Robin Verlangen  
> _Chief Data Architect_
> 
> W [http://www.robinverlangen.nl](http://www.robinverlangen.nl)  
> E robin@us2.nl
> 
> [http://goo.gl/Lt7BC](http://goo.gl/Lt7BC)  
> _What is CloudPelican? [http://goo.gl/HkB3D](http://goo.gl/HkB3D)_
> 
> Disclaimer: The information contained in this message and attachments is  
> intended solely for the attention and use of the named addressee and may be  
> confidential. If you are not the intended recipient, you are reminded that  
> the information remains the property of the sender. You must not use,  
> disclose, distribute, copy, print or rely on this e-mail. If you have  
> received this message in error, please contact the sender immediately and  
> irrevocably delete this message and any copies.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:05am UTC](https://discuss.elastic.co/t/node-shutdown/14465/3 "2017-07-06T02:05:45Z")

</div>


