Return-Path: Delivered-To: apmail-incubator-cassandra-commits-archive@minotaur.apache.org Received: (qmail 75986 invoked from network); 25 Aug 2009 16:07:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Aug 2009 16:07:14 -0000 Received: (qmail 56158 invoked by uid 500); 25 Aug 2009 16:07:39 -0000 Delivered-To: apmail-incubator-cassandra-commits-archive@incubator.apache.org Received: (qmail 56139 invoked by uid 500); 25 Aug 2009 16:07:39 -0000 Mailing-List: contact cassandra-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-commits@incubator.apache.org Received: (qmail 56129 invoked by uid 99); 25 Aug 2009 16:07:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2009 16:07:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2009 16:07:37 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 8ACAA11150 for ; Tue, 25 Aug 2009 16:07:17 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: cassandra-commits@incubator.apache.org Date: Tue, 25 Aug 2009 16:07:17 -0000 Message-ID: <20090825160717.7437.30642@eos.apache.org> Subject: [Cassandra Wiki] Update of "API" by JoeStump X-Virus-Checked: Checked by ClamAV on apache.org 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()`.|| +