Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 50147 invoked from network); 27 Sep 2010 12:25:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Sep 2010 12:25:38 -0000 Received: (qmail 88086 invoked by uid 500); 27 Sep 2010 12:25:36 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 87885 invoked by uid 500); 27 Sep 2010 12:25:33 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 87877 invoked by uid 99); 27 Sep 2010 12:25:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 12:25:32 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lucasnodine@gmail.com designates 209.85.214.44 as permitted sender) Received: from [209.85.214.44] (HELO mail-bw0-f44.google.com) (209.85.214.44) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Sep 2010 12:25:25 +0000 Received: by bwz9 with SMTP id 9so4305360bwz.31 for ; Mon, 27 Sep 2010 05:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=BQVB5GZCI5hPv1Ap5UnCGv1i8vWt/GEkaqxwqDnj+w4=; b=JJ8JuTNYND57GaeEZLtMq5vOXSAvp/5dZYdB3nsbc+BtI0znHSNMN7UKf6jKYYQq+0 Y3GjalLK8xjrJC+fpMQfhjPicDSa6rO/w8VAv/eaDWUBas9q4E7cDLIYU4eI36vVBC4C 7fhleyjkVhJ31OaPzg4Fs0GeEo3wj+jBkDm50= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=dAas7GJk2ygXwu8azDz/vnn5ljMaf0BzVNNpICXXRYs5lWzcYmHll+53vYH349WjqQ bfUKfe/fG0raJuTOwDUdWpQQzZrb2Tv3weaH/MShjSLXw4TpttipTpYN+o4rmSYhYkpr JvfM5E3+ORB7E8CQxe4XXo9DcPTdweMzeIgsU= MIME-Version: 1.0 Received: by 10.204.60.82 with SMTP id o18mr5070365bkh.174.1285590305204; Mon, 27 Sep 2010 05:25:05 -0700 (PDT) Received: by 10.204.115.5 with HTTP; Mon, 27 Sep 2010 05:25:05 -0700 (PDT) In-Reply-To: References: Date: Mon, 27 Sep 2010 07:25:05 -0500 Message-ID: Subject: Re: How to Retrieve all the rows from a ColumnFamily From: Lucas Nodine To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001636c5aca677f05604913cd1d8 X-Virus-Checked: Checked by ClamAV on apache.org --001636c5aca677f05604913cd1d8 Content-Type: text/plain; charset=ISO-8859-1 Example code using C# below: Collections.Generic.List results; SlicePredicate predicate; ColumnParent cp; // Create Slice predicate = new SlicePredicate() { Slice_range = new SliceRange() { Start = _utf8.GetBytes(""), Finish = _utf8.GetBytes(""), Count = 100, Reversed = false } }; // Column Parent cp = new ColumnParent() { Column_family = "MetaAssets" }; results = _client.get_slice(_utf8.GetBytes(guid.ToString("N")), cp, predicate, ConsistencyLevel.QUORUM); On Mon, Sep 27, 2010 at 2:44 AM, Benjamin Black wrote: > http://wiki.apache.org/cassandra/FAQ#iter_world > > On Sun, Sep 26, 2010 at 11:51 PM, sekhar kosuru > wrote: > > Hi > > I am new to Cassandra Database. > > I want to know how to Retrieve all the records from a column family, is > this > > is different in the clustered servers vs single servers. > > Please suggest me with piece of code if possible. > > > > /Regards > > Sekhar. > > > -- Lucas J. Nodine Assistant Labette County Attorney 201 S. Central, Suite B Parsons, KS 67357 (620) 421-6370 --001636c5aca677f05604913cd1d8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
= Examp= le code using C# below:
=A0
Collections.Generic.List<ColumnOrSuperColumn> results;
SlicePredicate predicate;
ColumnParent cp;
=A0
// Create Slice
predicate =3D new SlicePredicate()
{
=A0 Slic= e_range =3D new SliceRange()
=A0 {
=A0=A0 Start =3D _utf8.GetBytes(""<= font size=3D"2" face=3D"Consolas">),
= =A0=A0 Fin= ish =3D _utf8.GetBytes("")= ,
= =A0=A0 Cou= nt =3D 100,
=A0=A0=A0=A0 Reversed =3D false
=A0 }
};

// Column Parent=
cp =3D new ColumnParent() { Column_family =3D "MetaAssets" };=

results =3D _client.get_slice(_utf8.GetBytes(guid.ToString("N&= quot;)), cp, predicate, ConsistencyLevel.QUORUM);
=A0
=A0
On Mon, Sep 27, 2010 at 2:44 AM, Benjamin Black = <b@b3k.us> w= rote:
http://wiki.apache.org/cassan= dra/FAQ#iter_world

On Sun, Sep 26, 2010 at 11:51 PM, sekhar kosuru <<= a href=3D"mailto:kosurusekhar@gmail.com">kosurusekhar@gmail.com> wro= te:
> Hi
> I am new to Cassandra Database.
> I want to kn= ow how to Retrieve all the records from a column family, is this
> is different in the clustered servers vs single servers.
> Pleas= e suggest me with piece of code if possible.
>
> /Regards
&g= t; Sekhar.
>



--
Lucas J. Nodine
Assistant Labette County Attorney
201 S. C= entral, Suite B
Parsons, KS 67357
(620) 421-6370
--001636c5aca677f05604913cd1d8--