incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Stevens <migh...@gmail.com>
Subject Re: Representation of dynamically added columns in table (column family) schema using cqlsh
Date Fri, 12 Jul 2013 23:19:34 GMT
If you're creating dynamic columns via Thrift interface, they will not be
reflected in the CQL3 schema.  I would recommend not mixing paradigms like
that, either stick with CQL3 or Thrift / cassandra-cli.  With compact
storage creates column families which can be interacted with meaningfully
via Thrift, but you'll be lacking any metadata on those columns to interact
with them via cql.


On Fri, Jul 12, 2013 at 11:13 AM, Shahab Yunus <shahab.yunus@gmail.com>wrote:

> A basic question and it seems that I have a gap in my understanding.
>
> I have a simple table in Cassandra with multiple column families. I add
> new columns to each of these column families on the fly. When I view (using
> the 'DESCRIBE table' command) the schema of a particular column family, I
> see only one entry for column (bolded below). What is the reason for that?
> The column that I am adding have string names and byte values, written
> using Hector 1.1-3 (
> HFactory.createColumn(...) method).
>
> CREATE TABLE mytable (
>   key text,
>   *column1* ascii,
>   value blob,
>   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=1.000000 AND
>   replicate_on_write='true' AND
>   populate_io_cache_on_flush='false' AND
>   compaction={'class': 'SizeTieredCompactionStrategy'} AND
>   compression={'sstable_compression': 'SnappyCompressor'};
>
> cqlsh 3.0.2
> Cassandra 1.2.5
> CQL spec 3.0.0
> Thrift protocol 19.36.0
>
>
> Given this, I can also only query on this one column1 or value using the
> 'SELECT' statement.
>
> The OpsCenter on the other hand, displays multiple columns as
> expected. Basically the demarcation of multiple columns i clearer.
>
> Thanks a lot.
>
> Regards,
> Shahab
>

Mime
View raw message