There are 2 method to start/stop cassandra, it depends how installation is performed.
- tarball installation
- packaged installation
For tarball installation :-
- To start Cassandra in the foreground:
$ cd install_location $ bin/cassandra -f
..
..
INFO 11:04:27 Node localhost/127.0.0.1 state jump to NORMAL INFO 11:04:28 Netty using Java NIO event loop INFO 11:04:28 Using Netty Version: [netty-buffer=netty-buffer-4.0.23.Final.208198c, netty-codec=netty-codec-4.0.23.Final.208198c, netty-codec-http=netty-codec-http-4.0.23.Final.208198c, netty-codec-socks=netty-codec-socks-4.0.23.Final.208198c, netty-common=netty-common-4.0.23.Final.208198c, netty-handler=netty-handler-4.0.23.Final.208198c, netty-transport=netty-transport-4.0.23.Final.208198c, netty-transport-rxtx=netty-transport-rxtx-4.0.23.Final.208198c, netty-transport-sctp=netty-transport-sctp-4.0.23.Final.208198c, netty-transport-udt=netty-transport-udt-4.0.23.Final.208198c] INFO 11:04:28 Starting listening for CQL clients on localhost/127.0.0.1:9042 (unencrypted)...
- To stop cassandra
ps -ef | grep cassandra
get the pid from which cassandra is running and then use kill command to kill it.
kill
Packaged Installation :-
For packaged installation startup/stop scripts are copied inside /etc/init.d/ directory and service run as cassandra user.
- To start
service cassandra start
sudo service cassandra start ( non-root user)
- To Stop
service cassandra stop
sudo service cassandra stop ( non-root user)
No comments:
Post a Comment