• No results found

Synopsis Legend

In document Apache Cassandra 2.0 (Page 143-169)

nodetool <options> cfhistograms -- <keyspace> <table>

• options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

• -- Separates an option from an argument that could be mistaken for a option.

• keyspace is the name of a keyspace.

• table is the name of a table.

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

The nodetool cfhistograms command provides statistics about a table, including number of SSTables, read/write latency, partition (row) size, and cell count.

Example

If you are using DataStax Enterprise, performthe Wikipedia demo, and then run this command to get statistics about the solr table in the wiki keyspace.

$ nodetool cfhistograms wiki solr

The output shows latencies in microseconds (µs), partition (formerly called row) size in bytes, and the number of SSTables and the cell count. The Offset column corresponds to the x-axis in a histogram.

It represents buckets of values, which are a series of ranges. Each offset includes the range of values greater than the previous offset and less than or equal to the current offset. The offsets start at 1 and each subsequent offset is calculated by multiplying the previous offset by 1.2, rounding up, and removing duplicates. The offsets can range from 1 to approximately 25 million, with less precision as the offsets get larger.

For example:

• Offset 1 shows that 3579 requests only had to look at one SSTable. The SSTables column corresponds to how many SSTables were involved in a read request.

Cassandra tools

• Offset 86 shows that there were 663 requests with a write latency between 73 and 86 µs. The range falls into the 73 to 86 bucket.

On some versions of Cassandra, the output looks like this:

wiki/solr histograms

On other versions of Cassandra 2.0.x, the output does not label the columns. The offset is on the left, the latency on the right:

2299 us: 1

OpsCenter displays the same information in a better format for understanding the statistics.

cfstats

Provides statistics about tables.

Provides statistics about tables.

Synopsis

nodetool <options> cfstats -i -- (<keyspace>.<table> ... )

• options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

• -- Separates an option from an argument that could be mistaken for a option.

• keyspace.table is one or more keyspace and table names in dot notation.

Cassandra tools

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

The nodetool cfstats command provides statistics about one or more tables. You use dot notation to specify one or more keyspace and table names. If you do not specify a keyspace and table, Cassandra provides statistics about all tables.

This table describes the nodetool cfstats output.

Table: nodetool cfstats output

Keyspace libdata Name of the

keyspace

Keyspace and table

Read count 11207 Number of

requests to

Write count 17598 Number of

requests

Pending tasks 0 Tasks in the queue for

Name of

Table libout Name of the

Cassandra table

SSTable count 3 Number of

SSTables containing data from the table

How to use the SSTable counts metric and OpsCenter alert metrics

Cassandra memtable structure in memory

Memtable data

How memtables are measured article

Local read count 11207 Number of local read requests for the libout

OpsCenter alert documentation

Cassandra tools

Factors that affect read latency

Local write

Factors that affect write latency

Pending tasks 0 Number of

read, write, and cluster operations that are pending

OpsCenter pending task metrics documentation

Bloom filter false

Name of

Used to calculate what the approximate row cache size should be. Multiply the reported row cache size, which is the number of rows in the cache, by the compacted row mean size for every table and sum them.

Compacted

This example shows an excerpt of the output of the command after flushing a table of library data to disk.

Keyspace: libdata Read Count: 11207

Read Latency: 0.047931114482020164 ms.

Write Count: 17598

Write Latency: 0.053502954881236506 ms.

Pending Tasks: 0 Table: libout SSTable count: 3

Space used (live), bytes: 9088955 Space used (total), bytes: 9088955

Space used by snapshots (total), bytes: 0 SSTable Compression Ratio: 0.36751363892150946 Memtable cell count: 0

Memtable data size, bytes: 0 Memtable switch count: 3 Local read count: 11207 Local read latency: 0.048 ms Local write count: 17598 Local write latency: 0.054 ms Pending tasks: 0

Bloom filter false positives: 0 Bloom filter false ratio: 0.00000

Cassandra tools

Bloom filter space used, bytes: 11688 Compacted partition minimum bytes: 1110 Compacted partition maximum bytes: 126934 Compacted partition mean bytes: 2730

Average live cells per slice (last five minutes): 0.0 Average tombstones per slice (last five minutes): 0.0

cleanup

Cleans up keyspaces and partition keys no longer belonging to a node.

Cleans up keyspaces and partition keys no longer belonging to a node.

Synopsis

nodetool <options> cleanup -- <keyspace > ( <table> ... )

• options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

• -- Separates an option from an argument that could be mistaken for a option.

• keyspace is a keyspace name.

• table is one or more table names, separated by a space.

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

Use this command to remove unwanted data after adding a new node to the cluster. Cassandra does not automatically remove data from nodes that lose part of their partition range to a newly added node.

Run nodetool cleanup on the source node and on neighboring nodes that shared the same subrange after the new node is up and running. Failure to run this command after adding a node causes Cassandra to include the old data to rebalance the load on that node. Running the nodetool cleanup command causes a temporary increase in disk space usage proportional to the size of your largest SSTable. Disk I/O occurs when running this command.

Running this command affects nodes that use a counter column in a table. Cassandra assigns a new counter ID to the node.

Optionally, this command takes a list of table names. If you do not specify a keyspace, this command cleans all keyspaces no longer belonging to a node.

clearsnapshot

Removes one or more snapshots.

Removes one or more snapshots.

Synopsis

nodetool <options> clearsnapshot -t <snapshot > -- ( <keyspace> ... )

• options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

• -t means the following file contains the snapshot.

• -- Separates an option from an argument that could be mistaken for a option.

• keyspace is one or more keyspace names, separated by a space.

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

Deletes snapshots for one or more keyspaces. To remove all snapshots, omit the snapshot name.

CAUTION: Removing all snapshots or all specific keyspace snapshot also removes OpsCenter backups.

compact

Forces a major compaction on one or more tables.

Forces a major compaction on one or more tables.

Synopsis

nodetool <options> compact <keyspace> ( <table> ... )

• options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

• -- Separates an option and argument that could be mistaken for a option.

• keyspace is the name of a keyspace.

• table is one or more table names, separated by a space.

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

This command starts the compaction process on tables that use the SizeTieredCompactionStrategy or DateTieredCompactionStrategy. You can specify a keyspace for compaction. If you do not specify a keyspace, the nodetool command uses the current keyspace. You can specify one or more tables for compaction. If you do not specify a table(s), compaction of all tables in the keyspace occurs. This is called a major compaction. If you do specify a table(s), compaction of the specified table(s) occurs. This is called a minor compaction. A major compaction consolidates all existing SSTables into a single SSTable.

Cassandra tools

During compaction, there is a temporary spike in disk space usage and disk I/O because the old and new SSTables co-exist. A major compaction can cause considerable disk I/O.

compactionhistory

Provides the history of compaction operations.

Provides the history of compaction operations.

Synopsis

nodetool <options> compactionhistory options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

compactionstats

Provide statistics about a compaction.

Provide statistics about a compaction.

Synopsis

nodetool <options> compactionstats

• options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

• -- separates an option and argument that could be mistaken for a option.

• data center is the name of an arbitrarily chosen data center from which to select sources for streaming.

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

The total column shows the total number of uncompressed bytes of SSTables being compacted. The system log lists the names of the SSTables compacted.

Example

$ bin/nodetool compactionstats pending tasks: 5

compaction type keyspace table completed total unit progress

Compaction Keyspace1 Standard1 282310680 302170540 bytes 93.43%

Compaction Keyspace1 Standard1 58457931 307520780 bytes 19.01%

Active compaction remaining time : 0h00m16s

decommission

Deactivates a node by streaming its data to another node.

Deactivates a node by streaming its data to another node.

Synopsis

nodetool <options> decommission options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

Causes a live node to decommission itself, streaming its data to the next node on the ring. Use netstats to monitor the progress, as described on http://wiki.apache.org/cassandra/NodeProbe#Decommission and http://wiki.apache.org/cassandra/Operations#Removing_nodes_entirely.

describering

Provides the partition ranges of a keyspace.

Provides the partition ranges of a keyspace.

Synopsis

nodetool <options> describering -- <keyspace>

• options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

• -- Separates an option from an argument that could be mistaken for a option.

• keyspace is a keyspace name.

Cassandra tools

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

disableautocompaction

Disables autocompaction for a keyspace and one or more tables.

Disables autocompaction for a keyspace and one or more tables.

Synopsis

nodetool <options> disableautocompaction -- <keyspace> ( <table> ... )

• options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

• -- Separates an option and argument that could be mistaken for a option.

• keyspace is the name of a keyspace.

• table is one or more table names, separated by a space.

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

The keyspace can be followed by one or more tables.

disablebackup

Disables incremental backup.

Disables incremental backup.

Synopsis

nodetool <options> disablebackup options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

disablebinary

Disables the native transport.

Disables the native transport.

Synopsis

nodetool <options> disablebinary options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

Disables the binary protocol, also known as the native transport.

disablegossip

Disables the gossip protocol.

Disables the gossip protocol.

Synopsis

nodetool <options> disablegossip options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

This command effectively marks the node as being down.

Cassandra tools

disablehandoff

Disables storing of future hints on the current node.

Disables storing of future hints on the current node.

Synopsis

nodetool <options> disablehandoff options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

disablethrift

Disables the Thrift server.

Disables the Thrift server.

Synopsis

nodetool <options> disablethrift options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

drain

Drains the node.

Drains the node.

Synopsis

nodetool <options> drain options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

Flushes all memtables from the node to SSTables on disk. Cassandra stops listening for connections from the client and other nodes. You need to restart Cassandra after running nodetool drain. You typically use this command before upgrading a node to a new version of Cassandra. To simply flush memtables to disk, use nodetool flush.

enableautocompaction

Enables autocompaction for a keyspace and one or more tables.

Enables autocompaction for a keyspace and one or more tables.

Synopsis

nodetool <options> enableautocompaction -- <keyspace> ( <table> ... )

• options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

• -- Separates an option and argument that could be mistaken for a option.

• keyspace is the name of a keyspace.

• table is the name of one or more keyspaces, separated by a space.

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

The keyspace can be followed by one or more tables.

enablebackup

Enables incremental backup.

Enables incremental backup.

Synopsis

nodetool <options> enablebackup options are:

Cassandra tools

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

enablebinary

Re-enables native transport.

Re-enables native transport.

Synopsis

nodetool <options> enablebinary options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

Re-enables the binary protocol, also known as native transport.

enablegossip

Re-enables gossip.

Re-enables gossip.

Synopsis

nodetool <options> enablegossip options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

enablehandoff

Re-enables the storing of future hints on the current node.

Re-enables the storing of future hints on the current node.

Synopsis

nodetool <options> enablehandoff options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

enablethrift

Re-enables the Thrift server.

Re-enables the Thrift server.

Synopsis

nodetool <options> enablethrift options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Cassandra tools

flush

Flushes one or more tables from the memtable.

Flushes one or more tables from the memtable.

Synopsis

nodetool <options> flush -- <keyspace> ( <table> ... )

• options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

• -- Separates an option and argument that could be mistaken for a option.

• keyspace is the name of a keyspace.

• table is the name of one or more tables, separated by a space.

Synopsis Legend

• Angle brackets (< >) mean not literal, a variable

• Italics mean optional

• The pipe (|) symbol means OR or AND/OR

• Ellipsis (...) means repeatable

• Orange ( and ) means not literal, indicates scope

Description

You can specify a keyspace followed by one or more tables that you want to flush from the memtable to SSTables on disk.

getcompactionthreshold

Provides the minimum and maximum compaction thresholds in megabytes for a table.

Provides the minimum and maximum compaction thresholds in megabytes for a table.

Synopsis

nodetool <options> getcompactionthreshold -- <keyspace> <table>

• options are:

• ( -h | --host ) <host name> | <ip address>

• ( -p | --port ) <port number>

• ( -pw | --password ) <password >

• ( -u | --username ) <user name>

• -- Separates an option and argument that could be mistaken for a option.

• keyspace is the name of a keyspace.

• table is the name of a table.

• table is the name of a table.

In document Apache Cassandra 2.0 (Page 143-169)

Related documents