You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Russell Alexander Spitzer (JIRA)" <ji...@apache.org> on 2013/12/03 23:53:35 UTC

[jira] [Comment Edited] (CASSANDRA-6443) CQLSH in CQL2 mode (-2) Cannot set compaction_strategy

    [ https://issues.apache.org/jira/browse/CASSANDRA-6443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13838276#comment-13838276 ] 

Russell Alexander Spitzer edited comment on CASSANDRA-6443 at 12/3/13 10:52 PM:
--------------------------------------------------------------------------------

The actual bug seems to be in the python cql module. 

{code}
>>> import cql  
>>> con=cql.connect('127.0.0.1')
>>> cur=con.cursor()
>>> cur.execute('use testKS')
True
>>> cur.execute("CREATE TABLE tb (a int PRIMARY KEY, b int) with compaction_strategy_class = 'LeveledCompactionStrategy'")
True
>>> quit()
{code}
In cqlsh
{code}
cqlsh> DESCRIBE table "testKS".tb;

CREATE TABLE tb (
  a int PRIMARY KEY,
  b int
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=864000 AND
  read_repair_chance=0.100000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};
{code}


was (Author: rspitzer):
The actual bug seems to be in the python cql module. 

{code}
>>> import cql  
>>> con=cql.connect('127.0.0.1')
>>> cur=con.cursor()
>>> cur.execute('use testKS')
True
>>> cur.execute("CREATE TABLE tb (a int PRIMARY KEY, b int) with compaction_strategy_class = 'MemoryOnlyStrategy'")
True
>>> quit()
{code}
In cqlsh
{code}
cqlsh> DESCRIBE table "testKS".tb;

CREATE TABLE tb (
  a int PRIMARY KEY,
  b int
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.010000 AND
  caching='KEYS_ONLY' AND
  comment='' AND
  dclocal_read_repair_chance=0.000000 AND
  gc_grace_seconds=864000 AND
  read_repair_chance=0.100000 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};
{code}

> CQLSH in CQL2 mode (-2) Cannot set compaction_strategy
> ------------------------------------------------------
>
>                 Key: CASSANDRA-6443
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6443
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Drivers (now out of tree), Tools
>            Reporter: Russell Alexander Spitzer
>
> Attempting to create a table in CQLSH -2 will always result in SizeTieredCompaction regardless of specified option.
> {code}
> cqlsh:fun>  CREATE TABLE asciiCFLVL (  key ascii PRIMARY KEY,  asciiA ascii,  asciiB ascii  ) with compaction_strategy_class = 'LeveledCompactionStrategy' ;
> cqlsh:fun> DESCRIBE TABLE asciiCFLVL ;
> CREATE TABLE asciiCFLVL (
>   'key' ascii PRIMARY KEY,
>   asciiB ascii,
>   asciiA ascii
> ) WITH
>   comment='' AND
>   comparator=text 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='LZ4Compressor';
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)