incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Data Craftsman 木匠 <database.crafts...@gmail.com>
Subject Re: How to create a COLUMNFAMILY with Leveled Compaction?
Date Fri, 03 Aug 2012 20:31:14 GMT
Nobody use Leveled Compaction with CQL 3.0 ?

-Z

On Tue, Jul 31, 2012 at 11:17 AM, Data Craftsman 木匠
<database.craftsman@gmail.com> 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#compaction-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='LeveledCompactionStrategy';
> cqlsh:demo>
> cqlsh:demo> describe COLUMNFAMILY book;
>
> CREATE COLUMNFAMILY book (
>   isbn text PRIMARY KEY
> ) WITH
>   comment='' AND
>   comparator='CompositeType(org.apache.cassandra.db.marshal.LongType,org.apache.cassandra.db.marshal.UTF8Type)'
> AND
>   read_repair_chance=0.100000 AND
>   gc_grace_seconds=864000 AND
>   default_validation=text AND
>   min_compaction_threshold=4 AND
>   max_compaction_threshold=32 AND
>   replicate_on_write=True AND
>   compaction_strategy_class='SizeTieredCompactionStrategy' AND
>   compression_parameters:sstable_compression='org.apache.cassandra.io.compress.SnappyCompressor';
>
> cqlsh:demo>
>
> Thanks,
> Charlie (@mujiang) 一个 木匠
> =======
> Data Architect Developer
> http://mujiang.blogspot.com

Mime
View raw message