Book Image

Apache Cassandra Essentials

By : Nitin Padalia
Book Image

Apache Cassandra Essentials

By: Nitin Padalia

Overview of this book

Apache Cassandra Essentials takes you step-by-step from from the basics of installation to advanced installation options and database design techniques. It gives you all the information you need to effectively design a well distributed and high performance database. You’ll get to know about the steps that are performed by a Cassandra node when you execute a read/write query, which is essential to properly maintain of a Cassandra cluster and to debug any issues. Next, you’ll discover how to integrate a Cassandra driver in your applications and perform read/write operations. Finally, you’ll learn about the various tools provided by Cassandra for serviceability aspects such as logging, metrics, backup, and recovery.
Table of Contents (14 chapters)
Apache Cassandra Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Removing nodes from Cassandra cluster


Sometimes, we might need to reduce the size of a cluster due to a dead node or a machine with old hardware. In such scenarios, the remaining nodes must take responsibility for the data ranges of the dead node or the node that is being removed. Cassandra provides a command-line utility for both scenarios.

If a node is down and we want to remove it from the cluster, then we should run nodetool removenode <Dead-Node-ID> from some other node. This command streams the data for which this node was responsible to remaining nodes from the remaining replicas. In order to get the dead node ID, we can use the nodetool status command, as follows:

$ nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address        Load       Tokens  Owns    Host ID                               Rack
DN  10.76.215.17  225.04 MB  256     ?       940ba0cf-b75a-448c-a15e-40e05efbeb34  rack1
UN  10.76.215.24 ...