Database Reference
In-Depth Information
Info
The most straightforward command to issue is the info command. It tells Nodetool to connect
with a single node and get some basic data about its current state. Just pass it the address of the
node you want info for:
$ bin/nodetool -h 192.168.1.5 info
134439585115453215112331952664863163581
Load : 3.93 MB
Generation No : 1277663698
Uptime (seconds) : 19639
Heap Memory (MB) : 36.60 / 1011.25
The only item here that might not be entirely obvious is the “Generation No” field. This is
a heartbeat state associated with every endpoint. It's maintained by the Gossiper using a
timestamp.
Ring
To determine what nodes are in your ring and what state they're in, use the host and ring
switches on Nodetool, like this:
$ bin/nodetool -host 192.168.1.5 ring
This will give you a result like this one:
Address Status Load Range Ring
41654880048427970483049687892424207188
192.168.1.5 Up 1.71 KB 20846671262289044293293447172905883342 |<--|
192.168.1.7 Up 2.93 KB 41654880048427970483049687892424207188 |-->|
Here we see the IP addresses of all the nodes in the ring. In this case we have two nodes, one
at 1.5 and one at 1.7, both of which are up (currently available and ready for queries). The load
column represents the byte count of the data each node is holding.
Range Tokens
Keyspaces divide their data into ranges. Cassandra assigns each node in the cluster a unique
token, called the Range Token, which determines what keys that node will be the primary replica
for. The range column shown using the ring switch indicates the token each node is responsible
for.
There is a special range called the “wrapping range.” The node with the lowest token value gets
assigned all the keys that are less than that token, as well as all the keys greater than the range of
the largest token; i.e., it wraps from the largest back around to the lowest.
Search WWH ::




Custom Search