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 13524CA2D for ; Fri, 3 Aug 2012 20:31:44 +0000 (UTC) Received: (qmail 50709 invoked by uid 500); 3 Aug 2012 20:31:41 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 50683 invoked by uid 500); 3 Aug 2012 20:31:41 -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 50675 invoked by uid 99); 3 Aug 2012 20:31:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2012 20:31:41 +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 (nike.apache.org: domain of database.craftsman@gmail.com designates 209.85.212.44 as permitted sender) Received: from [209.85.212.44] (HELO mail-vb0-f44.google.com) (209.85.212.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2012 20:31:35 +0000 Received: by vbbez10 with SMTP id ez10so1266650vbb.31 for ; Fri, 03 Aug 2012 13:31:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=mGmaqcqfL/TgX2cx/PGslR2IBY5FHcMleH8EAIa9Jxs=; b=luQKHw2jCXwaV6CXUkSVfMz6MyNX8KPydy9yG77AXhC7FQUNVPRCynbxRrxPJBpAdC 5PLcVoAMmJ0wHIp4+clRw3sDmYe4W3QDnkgZQL6PN39aM6FxEjdB3tnKihrxv3bSfJ1P joVlMvBH1+BJmlxvnJiGteqruFwkLsBW9umE4DSRrKqrRQj1Ld+WDo0Wir5Ji0U1hWPN JbgfyuCKjMT8IZYfC37BFyQk9hXDfmXGQ+3wBkVhVR0HQ0sD0GyNHZt2sqmt2blVGlo7 a4/bIcczHYo7mnlGzZ5h2D0AczFRZsWDw9x+VovJ1lnzXYDWV+F2aQkB8qO47b1Kl3NS nVZg== MIME-Version: 1.0 Received: by 10.220.218.133 with SMTP id hq5mr2300449vcb.60.1344025874985; Fri, 03 Aug 2012 13:31:14 -0700 (PDT) Received: by 10.58.216.99 with HTTP; Fri, 3 Aug 2012 13:31:14 -0700 (PDT) In-Reply-To: References: Date: Fri, 3 Aug 2012 13:31:14 -0700 Message-ID: Subject: Re: How to create a COLUMNFAMILY with Leveled Compaction? From: =?UTF-8?B?RGF0YSBDcmFmdHNtYW4g5pyo5Yyg?= To: user@cassandra.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Nobody use Leveled Compaction with CQL 3.0 ? -Z On Tue, Jul 31, 2012 at 11:17 AM, Data Craftsman =E6=9C=A8=E5=8C=A0 wrote: > Sorry for my stupid simple question. How to create a COLUMNFAMILY with > Leveled Compaction? > > There is no example in documentation: > http://www.datastax.com/docs/1.1/configuration/storage_configuration#comp= action-strategy > > I try it on Cassandra 1.1.0 and 1.1.2, both failed. The COLUMNFAMILY > is still 'SizeTieredCompactionStrategy'. :( > > Here is my test and output: > > @host01:/usr/share/cassandra>cqlsh host01 --cql3 > Connected to BookCluster at host01:9160. > [cqlsh 2.2.0 | Cassandra 1.1.0 | CQL spec 3.0.0 | Thrift protocol 19.30.0= ] > Use HELP for help. > cqlsh> > cqlsh> use demo; > > cqlsh:demo> CREATE COLUMNFAMILY book > ... (isbn varchar, > ... book_id bigint, > ... price int, > ... obj varchar, > ... PRIMARY KEY (isbn, book_id) > ... ) > ... WITH compaction_strategy_class=3D'LeveledCompactionStrategy'; > cqlsh:demo> > cqlsh:demo> describe COLUMNFAMILY book; > > CREATE COLUMNFAMILY book ( > isbn text PRIMARY KEY > ) WITH > comment=3D'' AND > comparator=3D'CompositeType(org.apache.cassandra.db.marshal.LongType,or= g.apache.cassandra.db.marshal.UTF8Type)' > AND > read_repair_chance=3D0.100000 AND > gc_grace_seconds=3D864000 AND > default_validation=3Dtext AND > min_compaction_threshold=3D4 AND > max_compaction_threshold=3D32 AND > replicate_on_write=3DTrue AND > compaction_strategy_class=3D'SizeTieredCompactionStrategy' AND > compression_parameters:sstable_compression=3D'org.apache.cassandra.io.c= ompress.SnappyCompressor'; > > cqlsh:demo> > > Thanks, > Charlie (@mujiang) =E4=B8=80=E4=B8=AA =E6=9C=A8=E5=8C=A0 > =3D=3D=3D=3D=3D=3D=3D > Data Architect Developer > http://mujiang.blogspot.com