Database Reference
In-Depth Information
Note
For more information on data backup and restore, please refer to the “Data
flush
A memtable is a cache of data rows that can be looked up for a particular row key and
data. An implicit flush of memtables is automatically handled by Cassandra based on
the memtable threshold and throughput configurations defined in
cassandra.yaml
.
Using the
nodetool flush
command, we can explicitly flush data on a particular
data node. Reasons for explicit flushes include
•
The node is running out of space and needs to free some space on the
server side.
•
Data backup is occurring and you might need to restore it on another
node using the sstable loader.
•
A flush out to disk is required to reduce commit log replay during node
restart.
Explicitly flush memtables onto disk using the
nodetool flush
command as
follows:
vivek@vivek-Vostro-3560:~/software/local-cluster/node4$
bin/nodetool flush twitter_keyspace twitter
Running the preceding command explicitly flushes out data from memtables and
writes it onto disk for the keyspace
twitter_keyspace
and table
twitter
.
repair
You need to repair cluster nodes generally if
•
One or multiple nodes are in recovery mode.
•
One of the Cassandra nodes is not participating in reads.
•
A node is being added and data needs to manually be updated on that
node.