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 JonathanEllis
Date Mon, 31 Aug 2009 20:11:23 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 JonathanEllis:
http://wiki.apache.org/cassandra/API

The comment on the change is:
describe methods

------------------------------------------------------------------------------
  ||`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()`.||
  
+ === BatchMutation ===
+ 
+ ||'''Attribute'''||'''Type'''||'''Default'''||'''Required'''||'''Description'''||
+ ||`key`||`string`||n/a||H||The key to insert data for.||
+ ||`cfmap`||`map<string, list<ColumnOrSuperColumn>>`||n/a||N||A map of column
family names to `ColumnOrSuperColumn` objects to insert in that !ColumnFamily.||
+ 
  == Method calls ==
  
- TODO
+ === get ===
+   `ColumnOrSuperColumn get(keyspace, key, column_path, consistency_level)`
+ 
+ Get the `Column` or `SuperColumn` at the given `column_path`.  If no value is present, NotFoundException
is thrown.  (This is the only method that can throw an exception under non-failure conditions.)
+  
+ === get_slice ===
+   `list<ColumnOrSuperColumn> get_slice(keyspace, key, column_parent, predicate, consistency_level)`
+ 
+ Get the group of columns contained by `column_parent` (either a !ColumnFamily name or a
!ColumnFamily/!SuperColumn name pair) specified by the given `predicate`.  If no matching
values are found, an empty list is returned.
+ 
+ === multiget ===
+   `map<string,ColumnOrSuperColumn> multiget(keyspace, keys, column_path, consistency_level)`
+ list<string>
+ 
+ Perform a `get` for `column_path` in parallel on the given `list<string> keys`.  The
return value maps keys to the `ColumnOrSuperColumn` found.  If no value corresponding to a
key is present, the key will still be in the map, but both the `column` and `super_column`
references of the `ColumnOrSuperColumn` object it maps to will be null.
+ 
+ === multiget_slice ===
+   `map<string,list<ColumnOrSuperColumn>> multiget_slice(keyspace, keys, column_parent,
predicate, consistency_level)`
+ 
+ Performs a `get_slice` for `column_parent` and `predicate` for the given keys in parallel.
+ 
+ === get_count ===
+   `i32 get_count(keyspace, key, column_parent, consistency_level)`
+ 
+ Counts the columns present in `column_parent`.
+ 
+ === get_key_range ===
+   `list<string> get_key_range(keyspace, column_family, start, finish, count=100, consistency_level)`
+ 
+ Returns a list of keys starting with `start`, ending with `finish`, and at most `count`
long.  (The semantics are similar to the corresponding components of `SliceRange`.)  This
method is only allowed when using an order-preserving partitioner.
+ 
+ === insert ===
+   `insert(keyspace, key, column_path, value, timestamp, consistency_level)`
+ 
+ Insert a `Column` consisting of (`column_path.column`, `value`, `timestamp`) at the given
`column_path.column_family` and optional `column_path.super_column`.  Note that `column_path.column`
is here required, since a !SuperColumn cannot directly contain binary values -- it con only
contain sub-Columns.
+ 
+   `batch_insert(keyspace, batch_mutation, consistency_level)`
+ 
+ Insert the given `batch_mutation`, which is alone among methods here in containing its own
key.
+ 
+   `remove(keyspace, key, column_path, timestamp, consistency_level)`
+ 
+ Remove data from the row specified by `key` at the granularity specified by `column_path`,
and the given `timestamp`.  Note that all the values in `column_path` besides `column_path.column_family`
are truly optional: you can remove the entire row by just specifying the !ColumnFamily, or
you can remove a !SuperColumn or a single Column by specifying those levels too.
  
  == Examples ==
  
- Would someone public-spirited add some examples of the results you'd get with these methods?
+ TODO (contributions welcome)
  

Mime
View raw message