You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Kuldeep Mishra <ku...@gmail.com> on 2013/04/15 05:58:41 UTC

Added extra column as composite key while creation counter column family

Hi,
   While I creating counter column family a extra column is being added
what I do ?
Table creation script
 CREATE TABLE counters (
  key text,
  value counter,
  PRIMARY KEY (key)
 ) WITH COMPACT STORAGE

after describing column family I am getting following
CREATE TABLE counters (
  key text,
 * column1 text,*
  value counter,
  PRIMARY KEY (key,* column1*)
) 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
  compaction={'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'SnappyCompressor'};

extra column column1 is added

Please help

-- 
Thanks and Regards
Kuldeep Kumar Mishra
+919540965199

Re: Added extra column as composite key while creation counter column family

Posted by Robert Coli <rc...@eventbrite.com>.
On Tue, Apr 16, 2013 at 10:29 PM, Kuldeep Mishra
<ku...@gmail.com>wrote:

> cassandra 1.2.0
>
> Is it a bug in  1.2.0 ?
>

While I can't speak to this specific issue, 1.2.0 has meaningful known
issues. I suggest upgrade to 1.2.3(/4) ASAP.

=Rob

Re: Added extra column as composite key while creation counter column family

Posted by Kuldeep Mishra <ku...@gmail.com>.
cassandra 1.2.0

Is it a bug in  1.2.0 ?


Thanks
KK


On Wed, Apr 17, 2013 at 2:56 AM, aaron morton <aa...@thelastpickle.com>wrote:

> What version are you using ?
>
> WIth 1.2.4 …
>
> cqlsh:dev>  CREATE TABLE counters (
>        ...   key text,
>        ...   value counter,
>        ...   PRIMARY KEY (key)
>        ...  ) WITH COMPACT STORAGE;
> cqlsh:dev> describe table counters;
>
> CREATE TABLE counters (
>   key text PRIMARY KEY,
>   value counter
> ) 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': 'SnappyCompressor'};
>
> Cheers
>
> -----------------
> Aaron Morton
> Freelance Cassandra Consultant
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 15/04/2013, at 3:58 PM, Kuldeep Mishra <ku...@gmail.com>
> wrote:
>
> > Hi,
> >    While I creating counter column family a extra column is being added
> what I do ?
> > Table creation script
> >  CREATE TABLE counters (
> >   key text,
> >   value counter,
> >   PRIMARY KEY (key)
> >  ) WITH COMPACT STORAGE
> >
> > after describing column family I am getting following
> > CREATE TABLE counters (
> >   key text,
> >   column1 text,
> >   value counter,
> >   PRIMARY KEY (key, column1)
> > ) 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
> >   compaction={'class': 'SizeTieredCompactionStrategy'} AND
> >   compression={'sstable_compression': 'SnappyCompressor'};
> >
> > extra column column1 is added
> >
> > Please help
> >
> > --
> > Thanks and Regards
> > Kuldeep Kumar Mishra
> > +919540965199
>
>


-- 
Thanks and Regards
Kuldeep Kumar Mishra
+919540965199

Re: Added extra column as composite key while creation counter column family

Posted by aaron morton <aa...@thelastpickle.com>.
What version are you using ? 

WIth 1.2.4 …

cqlsh:dev>  CREATE TABLE counters (
       ...   key text,
       ...   value counter,
       ...   PRIMARY KEY (key)
       ...  ) WITH COMPACT STORAGE;
cqlsh:dev> describe table counters;

CREATE TABLE counters (
  key text PRIMARY KEY,
  value counter
) 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': 'SnappyCompressor'};

Cheers

-----------------
Aaron Morton
Freelance Cassandra Consultant
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 15/04/2013, at 3:58 PM, Kuldeep Mishra <ku...@gmail.com> wrote:

> Hi,
>    While I creating counter column family a extra column is being added what I do ?
> Table creation script
>  CREATE TABLE counters (
>   key text,
>   value counter,
>   PRIMARY KEY (key)
>  ) WITH COMPACT STORAGE
> 
> after describing column family I am getting following 
> CREATE TABLE counters (
>   key text,
>   column1 text,
>   value counter,
>   PRIMARY KEY (key, column1)
> ) 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
>   compaction={'class': 'SizeTieredCompactionStrategy'} AND
>   compression={'sstable_compression': 'SnappyCompressor'};
> 
> extra column column1 is added 
> 
> Please help
> 
> -- 
> Thanks and Regards
> Kuldeep Kumar Mishra
> +919540965199