Re: Best approach to prepare to shutdown a cassandra node

2017-10-25 Thread Anshu Vajpayee
use nodetool stopdaemon On Wed, Oct 25, 2017 at 4:42 AM, Javier Canillas wrote: > So, just to clarify.. a good approach to shutdown an instance of cassandra > should be: > > *# Drain all information from commitlog into sstables* > *bin/nodetool stopdaemon* >

Re: Best approach to prepare to shutdown a cassandra node

2017-10-24 Thread Javier Canillas
So, just to clarify.. a good approach to shutdown an instance of cassandra should be: *# Drain all information from commitlog into sstables* *bin/nodetool stopdaemon* *cassandra_pid=`ps -ef|grep "java.*apache-cassandra"|grep -v "grep"|awk '{print $2}'`* *if [ "$?" -ne 0 ]; then* *echo

Re: Best approach to prepare to shutdown a cassandra node

2017-10-20 Thread Lutaya Shafiq Holmes
Looking at the code in trunk, the stopdemon command invokes the CassandraDaemon.stop() function which does a graceful shutdown by stopping jmxServer and drains the node by the shutdown hook. On 10/20/17, Simon Fontana Oscarsson wrote: > Yes, drain will

Re: Best approach to prepare to shutdown a cassandra node

2017-10-20 Thread Simon Fontana Oscarsson
Yes, drain will always be run when Cassandra exits normally. On 2017-10-20 00:57, Varun Gupta wrote: Does, nodetool stopdaemon, implicitly drain too? or we should invoke drain and then stopdaemon? On Mon, Oct 16, 2017 at 4:54 AM, Simon Fontana Oscarsson

Re: Best approach to prepare to shutdown a cassandra node

2017-10-19 Thread Varun Gupta
Does, nodetool stopdaemon, implicitly drain too? or we should invoke drain and then stopdaemon? On Mon, Oct 16, 2017 at 4:54 AM, Simon Fontana Oscarsson < simon.fontana.oscars...@ericsson.com> wrote: > Looking at the code in trunk, the stopdemon command invokes the > CassandraDaemon.stop()

Re: Best approach to prepare to shutdown a cassandra node

2017-10-16 Thread Simon Fontana Oscarsson
Looking at the code in trunk, the stopdemon command invokes the CassandraDaemon.stop() function which does a graceful shutdown by stopping jmxServer and drains the node by the shutdown hook. /Simon On 2017-10-13 20:42, Javier Canillas wrote: As far as I know, the nodetool stopdaemon is doing

Re: Best approach to prepare to shutdown a cassandra node

2017-10-13 Thread Javier Canillas
As far as I know, the nodetool stopdaemon is doing a "kill -9". Or did it change? 2017-10-12 23:49 GMT-03:00 Anshu Vajpayee : > Why are you killing when we have nodetool stopdaemon ? > > On Fri, Oct 13, 2017 at 1:49 AM, Javier Canillas < > javier.canil...@gmail.com>

Re: Best approach to prepare to shutdown a cassandra node

2017-10-12 Thread Anshu Vajpayee
Why are you killing when we have nodetool stopdaemon ? On Fri, Oct 13, 2017 at 1:49 AM, Javier Canillas wrote: > That's what I thought. > > Thanks! > > 2017-10-12 14:26 GMT-03:00 Hannu Kröger : > >> Hi, >> >> Drain should be enough. It stops

Re: Best approach to prepare to shutdown a cassandra node

2017-10-12 Thread Javier Canillas
That's what I thought. Thanks! 2017-10-12 14:26 GMT-03:00 Hannu Kröger : > Hi, > > Drain should be enough. It stops accepting writes and after that > cassandra can be safely shut down. > > Hannu > > On 12 October 2017 at 20:24:41, Javier Canillas (javier.canil...@gmail.com)

Re: Best approach to prepare to shutdown a cassandra node

2017-10-12 Thread Hannu Kröger
Hi, Drain should be enough. It stops accepting writes and after that cassandra can be safely shut down. Hannu On 12 October 2017 at 20:24:41, Javier Canillas (javier.canil...@gmail.com) wrote: Hello everyone, I have some time working with Cassandra, but every time I need to shutdown a node

Best approach to prepare to shutdown a cassandra node

2017-10-12 Thread Javier Canillas
Hello everyone, I have some time working with Cassandra, but every time I need to shutdown a node (for any reason like upgrading version or moving instance to another host) I see several errors on the client applications (yes, I'm using the official java driver). By the way, I'm starting C* as a