Skip to Content
Cassandra: The Definitive Guide
book

Cassandra: The Definitive Guide

by Eben Hewitt
November 2010
Intermediate to advanced
328 pages
9h 38m
English
O'Reilly Media, Inc.
Content preview from Cassandra: The Definitive Guide

Chapter 10. Maintenance

In this chapter, we look at some things you can do to keep Cassandra healthy. So put your operations hat on, and let’s get started.

The Nodetool ships with Cassandra and can be found in <cassandra-home>/bin. This is a command-line program that offers a rich array of ways to look at your cluster, understand its activity, and modify it. Nodetool lets you get limited statistics about the cluster, see the ranges each node maintains, move data from one node to another, decommission a node, and even repair a node that’s having trouble.

Note

Many of the tasks in Nodetool overlap with functions available in the JMX interface. This is because, behind the scenes, Nodetool is invoking JMX using a helper class called NodeProbe. So JMX is doing the real work, the NodeProbe class is used to connect to the JMX agent and sort out the data, and the NodeCmd class is used to present it in an interactive command-line interface.

To use Nodetool, you need to have the same environment as Cassandra itself; that is, it requires the same classpath and logging files.

Note

The command-line Nodetool is a wrapper around org.apache.cassandra.tools.NodeCmd. Take a look at the source for that class if you need to know more about exactly what it’s doing.

Starting Nodetool is a breeze. Just open a terminal, navigate to <cassandra-home>, and enter the following command:

$bin/nodetool

Running it this way will error out, but you also cause the program to print a list of available commands, which are covered ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Cassandra: The Definitive Guide, 2nd Edition

Cassandra: The Definitive Guide, 2nd Edition

Jeff Carpenter, Eben Hewitt
Learning Apache Cassandra - Second Edition

Learning Apache Cassandra - Second Edition

Sandeep Yarabarla, Graham Doman

Publisher Resources

ISBN: 9781449399764Errata Page