Database Reference
In-Depth Information
Figure 3-13 . a) The image on the left shows adding the age column with value 32; b) the one on the right shows
updating the row for person id 1 with column fname for value vivs
Figure 3-13a and 3-13b depicts the insert of age column and modifying fname re-
spectively. Please note that Cassandra provides faster write throughput, because there
are no updates but only insert operations. But based on the timestamp, the row with the
latest timestamp will be returned as output. Here the timestamp is internally managed
by Cassandra itself. The process of compaction will manage freeing space by deletion
of obsolete or tombstone rows. With version 2.x Cassandra provides Compare and Set
(CAS) support. We will discuss this later in the “Compare and Set” section.
Cassandra Reads
The process of coordinator selection and assigning a read request to data node is simil-
ar to a write request. Cassandra returns columns for a particular row key with the latest
timestamp. Cassandra internally performs the following steps to return the column
name and value:
1.
First search memtable for cached values
2.
Scan sstables using bloom filter row key for column
3.
Sort eligible sstables by latest timestamp
4.
Merge and return columns with recent timestamp value
 
Search WWH ::




Custom Search