Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 36050 invoked from network); 1 Dec 2010 07:03:19 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Dec 2010 07:03:19 -0000 Received: (qmail 59117 invoked by uid 500); 1 Dec 2010 07:03:16 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 58957 invoked by uid 500); 1 Dec 2010 07:03:15 -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 58949 invoked by uid 99); 1 Dec 2010 07:03:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 07:03:15 +0000 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ivytang0812@gmail.com designates 209.85.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-iw0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 07:03:08 +0000 Received: by iwn40 with SMTP id 40so8434304iwn.31 for ; Tue, 30 Nov 2010 23:02:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=ryzN81w5yg6lcS6md6FBTNpYXMsxYFsYCjRnot5gAg8=; b=wk/2i/cIVUd7MWL1WDp/PYcZycWiI+5ZtU70CSG6T49MNWxlLP4cR4MxMks9VFfxi5 +roNYstYwc5O89LKF1oe41RefA82sLDloZgsC5jv07EOnY3JwTL6gL932aiD6g3BI/Zu rVAMFFV30oyUO1ZHedAQk8ohe122cMyFzyYpc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=QFIF2I2cXlyFdA7Em4nst09eRUPQ6eVp+PVOTCs/TR5ufJne1g5FS0RVDR9Ob+fBgQ y25/gJjXPLpN05eyHvdePyU2lkWQyC20Vsu3p/qQ657gJYaGGr2du3lKQZqyvPtNBtXo Jja5XlmDedHo4kwJ8wqw2W8+PxPwUbKXjnlgU= Received: by 10.231.34.2 with SMTP id j2mr8578178ibd.86.1291186967860; Tue, 30 Nov 2010 23:02:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.184.147 with HTTP; Tue, 30 Nov 2010 23:02:27 -0800 (PST) From: Ying Tang Date: Wed, 1 Dec 2010 15:02:27 +0800 Message-ID: Subject: When to call the major compaction ? To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=00032557a0d28ed74e049653e4fc --00032557a0d28ed74e049653e4fc Content-Type: text/plain; charset=ISO-8859-1 Every time cassandra creates a new sstable , it will call the CompactionManager.submitMinorIfNeeded ? And if the number of memtables is beyond MinimumCompactionThreshold , the minor compaction will be called. And there is also a method named CompactionManager.submitMajor , and the call relationship is : NodeCmd -- > NodeProbe -->StorageService.forceTableCompaction --> Table.forceCompaction -->CompactionManager.performMajor --> CompactionManager.submitMajor ColumnFamilyStore.forceMajorCompaction --> CompactionManager.performMajor --> CompactionManager.submitMajor HintedHandOffManager --> CompactionManager.submitMajor So i have 3 questions: 1. Once a new sstable has been created , CompactionManager.submitMinorIfNeeded will be called , minorCompaction maybe called . But when will the majorCompaction be called ? Just the NodeCmd ? 2. Which jobs will minorCompaction and majorCompaction do ? Will minorCompaction delete the data that have been marked as deleted ? And how about the major compaction ? 3. When gc be called ? Every time compaction been called? -- Best regards, Ivy Tang --00032557a0d28ed74e049653e4fc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Every time cassandra creates a new sstable , it will call the Compacti= onManager.submitMinorIfNeeded=A0 ? And if the number of memtables is beyond= =A0 MinimumCompactionThreshold=A0 , the minor compaction will be called.
And there is also a method named CompactionManager.submitMajor , and t= he call relationship is :
=A0
NodeCmd -- > NodeProbe -->StorageService.forceTableCompaction --= > Table.forceCompaction -->CompactionManager.performMajor --> Comp= actionManager.submitMajor
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= ColumnFamilyStore.forceMajorCompaction --> CompactionManager.performMaj= or --> CompactionManager.submitMajor
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0HintedHandOffManag= er=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0--> CompactionManager= .submitMajor
=A0
So i have=A03 questions:
1. Once a new sstable has been created ,=A0 CompactionManager.submitMi= norIfNeeded=A0 will be called , minorCompaction maybe called .
=A0=A0=A0 But when will the majorCompaction be called ? Just the NodeC= md ?
2. Which jobs will minorCompaction and majorCompaction do ?
=A0=A0=A0 Will minorCompaction delete the data that have been marked a= s deleted ?
=A0=A0=A0 And how about the major compaction ?
3. When gc be called ? Every time compaction been called?
=A0
=A0
=A0
--
Best regards,

Ivy Tang



--00032557a0d28ed74e049653e4fc--