If we create a column family:

CREATE TABLE videos (
  videoid uuid,
  videoname varchar,
  username varchar,
  description varchar,
  tags varchar,
  upload_date timestamp,
  PRIMARY KEY (videoid,videoname)
);

The CLI views this column like so:

create column family videos
  with column_type = 'Standard'
  and comparator =
'CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type)'
  and default_validation_class = 'UTF8Type'
  and key_validation_class = 'UUIDType'
  and read_repair_chance = 0.1
  and dclocal_read_repair_chance = 0.0
  and gc_grace = 864000
  and min_compaction_threshold = 4
  and max_compaction_threshold = 32
  and replicate_on_write = true
  and compaction_strategy =
'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
  and caching = 'KEYS_ONLY'
  and compression_options = {'sstable_compression' :
'org.apache.cassandra.io.compress.SnappyCompressor'};

[default@videos] list videos;
Using default limit of 100
Using default column limit of 100
-------------------
RowKey: b3a76c6b-7c7f-4af6-964f-803a9283c401
=> (column=Now my dog plays piano!:description, value=My dog learned
to play the piano b
ecause of the cat., timestamp=1352058289070000)
=> (column=Now my dog plays piano!:tags, value=dogs,piano,lol,
timestamp=1352058289070001)
invalid UTF8 bytes 00000139794c30c0

SELECT * FROM videos WHERE videoname = 'My funny cat';

 videoid                              | videoname    | description
                          | tags           | u
pload_date              | username
--------------------------------------+--------------+-------------------------------------------+----------------+--
------------------------+----------
 99051fe9-6a9c-46c2-b949-38ef78858dd0 | My funny cat | My cat likes to
play the piano! So funny. | cats,piano,lol | 2
012-06-01 08:00:00+0000 |    ctodd


CQL3 Allows me to search the second component of a primary key. Which
really just seems to be component 1 of a composite column.

So what thrift operation does this correspond to? This looks like a
column slice without specifying a key? How does this work internally?

Reply via email to