Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Apache Cassandra Essentials

You're reading from   Apache Cassandra Essentials Create your own massively scalable Cassandra database with highly responsive database queries

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher Packt
ISBN-13 9781783989102
Length 172 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Nitin Padalia Nitin Padalia
Author Profile Icon Nitin Padalia
Nitin Padalia
Arrow right icon
View More author details
Toc

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 ...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image