You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by S Ahmed <sa...@gmail.com> on 2013/07/17 22:53:58 UTC

is there a key to sstable index file?

Since SSTables are mutable, and they are ordered, does this mean that there
is a index of key ranges that each SS table holds, and the value could be 1
more sstables that have to be scanned and then the latest one is chosen?

e.g. Say I write a value "abc" to CF1.  This gets stored in a sstable.

Then I write "def" to CF1, this gets stored in another sstable eventually.

How when I go to fetch the value, it has to scan 2 sstables and then figure
out which is the latest entry correct?

So is there an index of key's to sstables, and there can be 1 or more
sstables per key?

(This is assuming compaction hasn't occurred yet).

Re: is there a key to sstable index file?

Posted by aaron morton <aa...@thelastpickle.com>.
This webinar I did a few months ago goes through the read and write path 

http://www.youtube.com/watch?v=zFCjekgK7ZY

I get to that about 29 minutes in. 

slides 
http://www.slideshare.net/aaronmorton/cassandra-community-webinar-introduction-to-apache-cassandra-12-20353118

Cheers

-----------------
Aaron Morton
Cassandra Consultant
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 18/07/2013, at 9:56 AM, Robert Coli <rc...@eventbrite.com> wrote:

> On Wed, Jul 17, 2013 at 1:53 PM, S Ahmed <sa...@gmail.com> wrote:
> So is there an index of key's to sstables, and there can be 1 or more sstables per key?
> 
> There are bloom filters, which answer the question "is my row key definitely not in this SSTable"?
> 
> There is also the Key Cache, which is a list of SSTables a given row key is known to be in, and at what offset.
> 
> =Rob


Re: is there a key to sstable index file?

Posted by Robert Coli <rc...@eventbrite.com>.
On Wed, Jul 17, 2013 at 1:53 PM, S Ahmed <sa...@gmail.com> wrote:

> So is there an index of key's to sstables, and there can be 1 or more
> sstables per key?
>

There are bloom filters, which answer the question "is my row key
definitely not in this SSTable"?

There is also the Key Cache, which is a list of SSTables a given row key is
known to be in, and at what offset.

=Rob

RE: is there a key to sstable index file?

Posted by Kanwar Sangha <ka...@mavenir.com>.
Yes..Multiple SSTables can have same key and only after compaction the keys are merged reflect the latest value..

From: S Ahmed [mailto:sahmed1020@gmail.com]
Sent: 17 July 2013 15:54
To: cassandra-user@incubator.apache.org
Subject: is there a key to sstable index file?

Since SSTables are mutable, and they are ordered, does this mean that there is a index of key ranges that each SS table holds, and the value could be 1 more sstables that have to be scanned and then the latest one is chosen?

e.g. Say I write a value "abc" to CF1.  This gets stored in a sstable.

Then I write "def" to CF1, this gets stored in another sstable eventually.

How when I go to fetch the value, it has to scan 2 sstables and then figure out which is the latest entry correct?

So is there an index of key's to sstables, and there can be 1 or more sstables per key?

(This is assuming compaction hasn't occurred yet).