Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E599CDC80 for ; Sat, 11 Aug 2012 18:56:38 +0000 (UTC) Received: (qmail 86765 invoked by uid 500); 11 Aug 2012 18:56:36 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 86743 invoked by uid 500); 11 Aug 2012 18:56:36 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 86735 invoked by uid 99); 11 Aug 2012 18:56:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Aug 2012 18:56:36 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of synfinatic@gmail.com designates 209.85.160.44 as permitted sender) Received: from [209.85.160.44] (HELO mail-pb0-f44.google.com) (209.85.160.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Aug 2012 18:56:31 +0000 Received: by pbbrr4 with SMTP id rr4so4706140pbb.31 for ; Sat, 11 Aug 2012 11:56:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=anN6LB1wnDZYyqcKUsMWHlMjhHePd3GSLedaNe4E5v4=; b=0zJUAgFj26qp06LUTgOMN2rdrb6iNZYR98YeOICpoOCFlnos/xHiouQektBzcY32ws 9yqmPazff7z6k/AP+0Rrogu8S6DeM4vBesi2nj7qVHWo202C1lnW/Xuf/MKAn2ROiYWM HA3Ypuo6CoQTdb2hjDV1Ef5pCg/A3KpEcchcwDqYA+C+AHSFQ2mPD2qv7mj1SvjtG/Bu ZJ1oAoYn84K35G+BrgsiaWk5vpXAIL4+h8y9HSbIaKLwdG6IdjJFZ88V6k+PQv8YFbkw lkOxluuxjv0lRERKDo7ROqyoYB/r1wB8o+e6KnckXAqahZtLyq4ir4MJy/5OG8PQRu+p 9WvA== Received: by 10.68.212.161 with SMTP id nl1mr7645425pbc.84.1344711370657; Sat, 11 Aug 2012 11:56:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.4.10 with HTTP; Sat, 11 Aug 2012 11:55:50 -0700 (PDT) In-Reply-To: References: <3BC67EDA-4C35-410A-94CF-CC49FD962114@gmail.com> From: Aaron Turner Date: Sat, 11 Aug 2012 11:55:50 -0700 Message-ID: Subject: Re: quick question about data layout on disk To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Thanks Russell, that's the info I was looking for! On Sat, Aug 11, 2012 at 11:23 AM, Russell Haering wrote: > Your update doesn't go directly to an sstable (which are immutable), > it is first merged to an in-memory table. Eventually the memtable is > flushed to a new sstable. > > See http://wiki.apache.org/cassandra/MemtableSSTable > > On Sat, Aug 11, 2012 at 11:03 AM, Aaron Turner wrote: >> So how does that work? An sstable is for a single CF, but it can and >> likely will have multiple rows. There is no read to write and as I >> understand it, writes are append operations. >> >> So if you have an sstable with say 26 different rows (A-Z) already in >> it with a bunch of columns and you add a new column to row J, how does >> Cassandra store the column/value pair on disk in a way to refer to row >> J without re-writing the row key or some representation of it? >> >> Thanks, >> Aaron >> >> On Fri, Aug 10, 2012 at 7:53 PM, Terje Marthinussen >> wrote: >>> Rowkey is stored only once in any sstable file. >>> >>> That is, in the spesial case where you get sstable file per column/value, you are correct, but normally, I guess most of us are storing more per key. >>> >>> Regards, >>> Terje >>> >>> On 11 Aug 2012, at 10:34, Aaron Turner wrote: >>> >>>> Curious, but does cassandra store the rowkey along with every >>>> column/value pair on disk (pre-compaction) like Hbase does? If so >>>> (which makes the most sense), I assume that's something that is >>>> optimized during compaction? >>>> >>>> >>>> -- >>>> Aaron Turner >>>> http://synfin.net/ Twitter: @synfinatic >>>> http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows >>>> Those who would give up essential Liberty, to purchase a little temporary >>>> Safety, deserve neither Liberty nor Safety. >>>> -- Benjamin Franklin >>>> "carpe diem quam minimum credula postero" >> >> >> >> -- >> Aaron Turner >> http://synfin.net/ Twitter: @synfinatic >> http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows >> Those who would give up essential Liberty, to purchase a little temporary >> Safety, deserve neither Liberty nor Safety. >> -- Benjamin Franklin >> "carpe diem quam minimum credula postero" -- Aaron Turner http://synfin.net/ Twitter: @synfinatic http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin "carpe diem quam minimum credula postero"