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 BenBangert
Date Thu, 18 Mar 2010 19:48:05 GMT
Dear Wiki user,

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

The "API" page has been changed by BenBangert.
The comment on this change is: Add note about consistency level defaults in user-space tools..
http://wiki.apache.org/cassandra/API?action=diff&rev1=47&rev2=48

--------------------------------------------------

  ||`QUORUM` ||Ensure that the write has been written to `<ReplicationFactor> / 2 +
1` nodes before responding to the client. ||
  ||`ALL` ||Ensure that the write is written to all `<ReplicationFactor>` nodes before
responding to the client.  Any unresponsive nodes will fail the operation. ||
  
+ 
  ==== Read ====
  ||'''Level''' ||'''Behavior''' ||
  ||`ZERO` ||Not supported, because it doesn't make sense. ||
@@ -45, +46 @@

  ||`QUORUM` ||Will query all storage nodes and return the record with the most recent timestamp
once it has at least a majority of replicas reported.  Again, the remaining replicas will
be checked in the background. ||
  ||`ALL` ||Will query all storage nodes and return the record with the most recent timestamp
once all nodes have replied.  Any unresponsive nodes will fail the operation. ||
  
+ 
+ '''Note: '''Thrift prior to version 0.6 defaults to a Write Consistency Level of ZERO. Different
language toolkits may have their own Consistency Level defaults as well. To ensure the desired
Consistency Level, you should always explicitly set the Consistency Level.
+ 
  === ColumnOrSuperColumn ===
  Due to the lack of inheritance in Thrift, `Column` and `SuperColumn` structures are aggregated
by the `ColumnOrSuperColumn` structure. This is used wherever either a `Column` or `SuperColumn`
would normally be expected.
  
  If the underlying column is a `Column`, it will be contained within the `column` attribute.
If the underlying column is a `SuperColumn`, it will be contained within the `super_column`
attribute. The two are mutually exclusive - i.e. only one may be populated.
  ||'''Attribute''' ||'''Type''' ||'''Default''' ||'''Required''' ||'''Description''' ||
- ||`column` ||`Column` ||n/a ||N ||The `Column` if this `ColumnOrSuperColumn` is aggregating
a `Column`.||
+ ||`column` ||`Column` ||n/a ||N ||The `Column` if this `ColumnOrSuperColumn` is aggregating
a `Column`. ||
  ||`super_column` ||`SuperColumn` ||n/a ||N ||The `SuperColumn` if this `ColumnOrSuperColumn`
is aggregating a `SuperColumn` ||
  
+ 
+ 
+ 
  === Column ===
- The `Column` is a triplet of a name, value and timestamp. As described above, `Column` names
are unique within a row. Timestamps are arbitrary - they can be any integer you specify, however
they must be consistent across your application. It is recommended to use a timestamp value
with a fine granularity, such as milliseconds since the UNIX epoch. See [[DataModel]] for
more information.
+ The `Column` is a triplet of a name, value and timestamp. As described above, `Column` names
are unique within a row. Timestamps are arbitrary - they can be any integer you specify, however
they must be consistent across your application. It is recommended to use a timestamp value
with a fine granularity, such as milliseconds since the UNIX epoch. See DataModel for more
information.
  ||'''Attribute''' ||'''Type''' ||'''Default''' ||'''Required''' ||'''Description''' ||
  ||`name` ||`binary` ||n/a ||Y ||The name of the `Column`. ||
  ||`value` ||`binary` ||n/a ||Y ||The value of the `Column`. ||
  ||`timestamp` ||`i64` ||n/a ||Y ||The timestamp of the `Column`. ||
  
+ 
+ 
+ 
  === SuperColumn ===
- A `SuperColumn` contains no data itself, but instead stores another level of `Columns` below
the key. See [[DataModel]] for more details on what `SuperColumns` are and how they should
be used.
+ A `SuperColumn` contains no data itself, but instead stores another level of `Columns` below
the key. See DataModel for more details on what `SuperColumns` are and how they should be
used.
  ||'''Attribute''' ||'''Type''' ||'''Default''' ||'''Required''' ||'''Description''' ||
  ||`name` ||`binary` ||n/a ||Y ||The name of the `SuperColumn`. ||
  ||`columns` ||`list<Column>` ||n/a ||Y ||The `Columns` within the `SuperColumn`. ||
+ 
+ 
+ 
  
  === ColumnPath ===
  The `ColumnPath` is the path to a single column in Cassandra. It might make sense to think
of `ColumnPath` and `ColumnParent` in terms of a directory structure.
@@ -73, +86 @@

  ||`super_column` ||`binary` ||n/a ||N ||The super column name. ||
  ||`column` ||`binary` ||n/a ||N ||The column name. ||
  
+ 
+ 
+ 
  === ColumnParent ===
  The `ColumnParent` is the path to the parent of a particular set of `Columns`. It is used
when selecting groups of columns from the same !ColumnFamily. In directory structure terms,
imagine `ColumnParent` as `ColumnPath + '/../'`.
  ||'''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. ||
  
+ 
+ 
+ 
  === SlicePredicate ===
  A `SlicePredicate` is similar to a [[http://en.wikipedia.org/wiki/Predicate_(mathematical_logic)|mathematic
predicate]], which is described as "a property that the elements of a set have in common."
  
@@ -86, +105 @@

  ||'''Attribute''' ||'''Type''' ||'''Default''' ||'''Required''' ||'''Description''' ||
  ||`column_names` ||`list<binary>` ||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. ||
+ 
+ 
+ 
  
  If `column_names` is specified, `slice_range` is ignored.
  
@@ -96, +118 @@

  ||`finish` ||`binary` ||n/a ||Y ||The column name to stop the slice at. This attribute is
not required, though there is no default value, and can be safely set to an empty byte array
to not stop until `count` results are seen. Otherwise, it must also be a valid value to the
`ColumnFamily` Comparator. ||
  ||`reversed` ||`bool` ||`false` ||Y ||Whether the results should be ordered in reversed
order. Similar to `ORDER BY blah DESC` in SQL. ||
  ||`count` ||`integer` ||`100` ||Y ||How many columns to return. Similar to `LIMIT 100` in
SQL. May be arbitrarily large, but Thrift will materialize the whole result into memory before
returning it to the client, so be aware that you may be better served by iterating through
slices by passing the last value of one call in as the `start` of the next instead of increasing
`count` arbitrarily large. ||
+ 
+ 
+ 
  
  === KeyRange ===
  '''''Requires Cassandra 0.6'''''
@@ -110, +135 @@

  ||`end_token` ||`string` ||n/a ||N ||The last token in the exclusive `KeyRange`. ||
  ||`count` ||`i32` ||100 ||Y ||The total number of keys to permit in the `KeyRange`. ||
  
+ 
+ 
+ 
  === KeySlice ===
  '''''Requires Cassandra 0.6'''''
  
@@ -117, +145 @@

  ||'''Attribute''' ||'''Type''' ||'''Default''' ||'''Required''' ||'''Description''' ||
  ||`key` ||`string` ||n/a ||Y ||The key for the slice. ||
  ||`columns` ||`list<ColumnOrSuperColumn>` ||n/a ||Y ||The columns in the slice. ||
+ 
+ 
+ 
  
  === TokenRange ===
  '''''Requires Cassandra 0.6'''''
@@ -127, +158 @@

  ||`end_token` ||`string` ||n/a ||Y ||The last token in the `TokenRange`. ||
  ||`endpoints` ||`list<string>` ||n/a ||Y ||A list of the endpoints (nodes) that replicate
data in the `TokenRange`. ||
  
+ 
+ 
+ 
  === Mutation ===
  '''''Requires Cassandra 0.6'''''
  
@@ -134, +168 @@

  ||'''Attribute''' ||'''Type''' ||'''Default''' ||'''Required''' ||'''Description''' ||
  ||`column_or_supercolumn` ||`ColumnOrSuperColumn` ||n/a ||N ||The column to insert in to
the key. ||
  ||`deletion` ||`Deletion` ||n/a ||N ||The deletion to execute on the key. ||
+ 
+ 
+ 
  
  === Deletion ===
  '''''Requires Cassandra 0.6'''''
@@ -144, +181 @@

  ||`super_column` ||`binary` ||n/a ||N ||The super column to delete the column(s) from. ||
  ||`predicate` ||`SlicePredicate` ||n/a ||N ||A predicate to match the column(s) to be deleted
from the key/super column. ||
  
+ 
+ 
+ 
  === AuthenticationRequest ===
  '''''Requires Cassandra 0.6'''''
  
  A structure that encapsulates a request for the connection to be authenticated. The authentication
credentials are arbitrary - this structure simply provides a mapping of credential name to
credential value.
  ||'''Attribute''' ||'''Type''' ||'''Default''' ||'''Required''' ||'''Description''' ||
  ||`credentials` ||`map<string, string>` ||n/a ||Y ||A map of named credentials. ||
+ 
+ 
+ 
  
  == Method calls ==
  === login ===
@@ -181, +224 @@

  
  Retrieves slices for `column_parent` and `predicate` on each of the given keys in parallel.
Keys are a `list<string> of the keys to get slices for.
  
- This is similar to `get_range_slices` (Cassandra 0.6) or `get_range_slice` (Cassandra 0.5)
except operating on a set of non-contiguous keys instead of a range of keys. 
+ This is similar to `get_range_slices` (Cassandra 0.6) or `get_range_slice` (Cassandra 0.5)
except operating on a set of non-contiguous keys instead of a range of keys.
  
  === get_count ===
   . `i32 get_count(keyspace, key, column_parent, consistency_level)`

Mime
View raw message