cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Cassandra Wiki] Update of "API" by JoeStump
Date Tue, 25 Aug 2009 16:07:17 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.

The following page has been changed by JoeStump:
http://wiki.apache.org/cassandra/API

The comment on the change is:
Added ColumnPath, ColumnParent, and ColumnOrSuperColumn.

------------------------------------------------------------------------------
  
  The Cassandra Thrift API changed between 0.3 and 0.4. Cassandra's client API is built entirely
on top of Thrift. It should be noted that these documents mention default values, which are
not supported in all of the languages that Thrift supports. 
  
- '''WARNING:''' Some SQL/RDBMS terminology being used in this documentation for analogy purposes.
They should be thought of as just that; analogies. There are few similarities between how
data is managed in a traditional RDBMS and Cassandra. Please see DataModel for more information.
+ '''WARNING:''' Some SQL/RDBMS terms are used in this documentation for analogy purposes.
They should be thought of as just that; analogies. There are few similarities between how
data is managed in a traditional RDBMS and Cassandra. Please see DataModel for more information.
  
  == Terminology / Abbreviations ==
   Keyspace:: Contains multiple Column Families.
   CF:: !ColumnFamily.
   SCF:: !ColumnFamily of type "Super".
+  Key:: A unique value that identifies a row in a CF. Keys must be unique inside a given
CF.
  
  == Exceptions ==
   NotFoundException:: A specific column was requested that does not exist.
@@ -39, +40 @@

  ||`QUORUM`||Will query all storage nodes and return the record that is prevailing in consistency.
For instance, if `foo = 1` on nodes A and B, while `foo = 2` on node C then the prevailing
consistency is `foo = 1`. A background thread will be fired off to fix consistency issues.||
  ||`ALL`||Not supported.||
  
+ === ColumnPath ===
+ 
+ The `ColumnPath` is the path to a single column in Cassandra. It might make sense to think
of `ColumnPath` (and the soon-to-be-discussed `ColumnParent`) in terms of a directory structure.

+ 
+ ||'''Attribute'''||'''Type'''||'''Default'''||'''Required'''||'''Description'''||
+ ||`column_family`||`string`||n/a||Y||The name of the CF of the column being looked up.||
+ ||`super_column`||`binary`||n/a||N||The super column name.||
+ ||`column`||`binary`||n/a||N||The column name.||
+ 
+ When looking up a key 
+ 
+ === ColumnParent ===
+ 
+ Imagine `ColumnParent` as `ColumnPath + '/../'`. 
+ 
  === SliceRange ===
  
  A slice range is a structure that stores basic range, ordering and limit information for
a query that will return multiple keys. It could be thought of as Cassandra's version of `LIMIT`
and `ORDER BY`.
@@ -61, +77 @@

  ||`column_names`||`list`||n/a||N||A list of column names to retrieve. This can be used similar
to Memcached's "multi-get" feature to fetch N known column names. For instance, if you know
you wish to fetch columns 'Joe', 'Jack', and 'Jim' you can pass those column names as a list
to fetch all three at once.||
  ||`slice_range`||`SliceRange`||n/a||N||A `SliceRange` describing how to range, order, and/or
limit the slice.||
  
+ === ColumnOrSuperColumn ===
+ 
+ Methods for fetching rows/records from Cassandra will return either a single instance of
`ColumnOrSuperColumn` (`get()`) or a list of `ColumnOrSuperColumn`'s (`get_slice()`). If you're
looking up a `SuperColumn` (or list of `SuperColumn`'s) then the resulting instances of `ColumnOrSuperColumn`
will have the requested `SuperColumn` in the attribute `super_column`. For queries resulting
in `Column`'s those values will be in the attribute `column`. This change was made between
0.3 and 0.4 to standardize on single query methods that may return either a `SuperColumn`
or `Column`.
+ 
+ ||'''Attribute'''||'''Type'''||'''Default'''||'''Required'''||'''Description'''||
+ ||`column`||`Column`||n/a||N||The `Column` returned by `get()` or `get_slice()`.||
+ ||`super_column`||`SuperColumn`||n/a||N||The `SuperColumn` returned by `get()` or `get_slice()`.||
+ 

Mime
View raw message