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 "API10" by JorisvanderWel
Date Thu, 03 Nov 2011 21:56:12 GMT
Dear Wiki user,

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

The "API10" page has been changed by JorisvanderWel:
http://wiki.apache.org/cassandra/API10?action=diff&rev1=29&rev2=30

Comment:
Halfway through 0.8-1.0 API changes

  ## page was renamed from API07
  ## page was copied from API
  == Overview ==
- The Cassandra Thrift API changed between [[API03|0.3]], [[API04|0.4]], [[API05|0.5]], [[API06|0.6]],
and 0.7; this document explains the 0.7 version.
+ The Cassandra Thrift API changed between [[API03|0.3]], [[API04|0.4]], [[API05|0.5]], [[API06|0.6]],
and [[API07|0.7]]; this document explains the 1.0 version.
  
  Cassandra's client API is built entirely on top of Thrift. It should be noted that these
documents mention default values, but these are not generated in all of the languages that
Thrift supports.  Full examples of using Cassandra from Thrift, including setup boilerplate,
are found on ThriftExamples.  Higher-level clients are linked from ClientOptions.
  
@@ -25, +25 @@

   TApplicationException:: Internal server error or invalid Thrift method (possible if you
are using an older version of a Thrift client with a newer build of the Cassandra server).
   AuthenticationException:: Invalid authentication request (user does not exist or credentials
invalid)
   AuthorizationException:: Invalid authorization request (user does not have access to keyspace)
+  SchemaDisagreementException:: Schemas are not in agreement across all nodes
  
  == Structures ==
  === ConsistencyLevel ===
@@ -36, +37 @@

  ||'''Level''' ||'''Behavior''' ||
  ||`ANY` ||Ensure that the write has been written to at least 1 node, including HintedHandoff
recipients. ||
  ||`ONE` ||Ensure that the write has been written to at least 1 replica's commit log and
memory table before responding to the client. ||
+ ||`TWO` ||Ensure that the write has been written to at least 2 replica's commit log and
memory table before responding to the client. ||
+ ||`THREE` ||Ensure that the write has been written to at least 3 replica's commit log and
memory table before responding to the client. ||
  ||`QUORUM` ||Ensure that the write has been written to `N / 2 + 1` replicas before responding
to the client. ||
  ||`LOCAL_QUORUM` ||Ensure that the write has been written to `<ReplicationFactor>`
/ 2 + 1 nodes, within the local datacenter (requires `NetworkTopologyStrategy`) ||
  ||`EACH_QUORUM` ||Ensure that the write has been written to `<ReplicationFactor>`
/ 2 + 1 nodes in each datacenter (requires `NetworkTopologyStrategy`) ||
@@ -46, +49 @@

  ||'''Level''' ||'''Behavior''' ||
  ||`ANY` ||Not supported. You probably want ONE instead. ||
  ||`ONE` ||Will return the record returned by the first replica to respond. A consistency
check is always done in a background thread to fix any consistency issues when `ConsistencyLevel.ONE`
is used. This means subsequent calls will have correct data even if the initial read gets
an older value.  (This is called ReadRepair) ||
+ ||`TWO` ||Will query 2 replicas and return the record with the most recent timestamp.  Again,
the remaining replicas will be checked in the background. ||
+ ||`THREE` ||Will query 2 replicas and return the record with the most recent timestamp.
||
  ||`QUORUM` ||Will query all replicas and return the record with the most recent timestamp
once it has at least a majority of replicas (`N / 2 + 1`) reported.  Again, the remaining
replicas will be checked in the background. ||
  ||`LOCAL_QUORUM` ||Returns the record with the most recent timestamp once a majority of
replicas within the local datacenter have replied. ||
  ||`EACH_QUORUM` ||Returns the record with the most recent timestamp once a majority of replicas
within each datacenter have replied. ||
@@ -61, +66 @@

  ||'''Attribute''' ||'''Type''' ||'''Default''' ||'''Required''' ||'''Description''' ||
  ||`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` ||
- 
+ ||`counter_column` ||`CounterColumn` ||n/a ||N ||The `CounterColumn` if this `ColumnOrSuperColumn`
is aggregating a `CounterColumn`. ||
+ ||`counter_super_column` ||`CounterSuperColumn` ||n/a ||N ||The `CounterSuperColumn` if
this `ColumnOrSuperColumn` is aggregating a `CounterSuperColumn` ||
  
  
  
  === 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 (the CLI uses microseconds).
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`. ||
- 
+ ||`ttl` ||`i32` ||n/a ||N ||An optional, positive delay (in seconds) after which the `Column`
will be automatically deleted. ||
  
  
  
@@ -82, +88 @@

  ||`columns` ||`list<Column>` ||n/a ||Y ||The `Columns` within the `SuperColumn`. ||
  
  
+ === CounterColumn ===
+ A `CounterColumn` only allows for addition and subtraction. See [[Counters|Counters]] 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`. ||
+ 
+ === CounterSuperColumn ===
+ A `CounterSuperColumn` contains no data itself, but instead stores another level of `CounterColumn`
below the key.
+ ||'''Attribute''' ||'''Type''' ||'''Default''' ||'''Required''' ||'''Description''' ||
+ ||`name` ||`binary` ||n/a ||Y ||The name of the `SuperColumn`. ||
+ ||`columns` ||`list<CounterColumn>` ||n/a ||Y ||The `CounterColumns` within the `CounterSuperColumn`.
||
  
  
  === ColumnPath ===

Mime
View raw message