Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 7974 invoked from network); 20 Oct 2010 19:09:28 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Oct 2010 19:09:28 -0000 Received: (qmail 82406 invoked by uid 500); 20 Oct 2010 19:09:26 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 82370 invoked by uid 500); 20 Oct 2010 19:09:26 -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 82362 invoked by uid 99); 20 Oct 2010 19:09:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Oct 2010 19:09:26 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a51.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Oct 2010 19:09:19 +0000 Received: from homiemail-a51.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a51.g.dreamhost.com (Postfix) with ESMTP id 64B812E806D for ; Wed, 20 Oct 2010 12:08:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=to:from :subject:date:message-id:content-type:mime-version:in-reply-to; q=dns; s=thelastpickle.com; b=AfFK4Qg3nqRk9gGLGcLVdzmJ9s2BAQzYL Y2ypqlg99ZhC3pXaSiJaLd5hA86074I345jfvrD/dRYOimNd+xeMqVBBDe+qMckn AkrJK2AvAeFGY6/qkK5+vRKAxBh8TPx9WRMcG9/5TwCno7btsIfYQnCUdIlLc+T6 6s10oHDcyM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=to :from:subject:date:message-id:content-type:mime-version: in-reply-to; s=thelastpickle.com; bh=jxgO6KxZLKq8YsgxDNQmQJCXsuE =; b=4bZ6wEJkrQR8cE0qNf8/eKkc+p/wyIVO1TSfYcOtbTn60z8YhQB7/D0kMBa JTW+h/bRnycHsgOGOY3F5HS81acLrTnTphMBgmcSHfNSdNIbzoqza22wB4NvUV2s 36LdrlXk7QWtaeOGUgyc3Ue8ziYqv2SP3AX+wwLFGdrZ2mGQ= Received: from localhost (webms.mac.com [17.148.16.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a51.g.dreamhost.com (Postfix) with ESMTPSA id 4E6562E806A for ; Wed, 20 Oct 2010 12:08:56 -0700 (PDT) To: user@cassandra.apache.org From: Aaron Morton Subject: Re: Hadoop Word Count Super Column Example? Date: Wed, 20 Oct 2010 19:08:55 GMT X-Mailer: MobileMe Mail (1C3205) Message-id: <7323e79f-6010-6f46-a26e-b9fefa18b517@me.com> Content-Type: multipart/alternative; boundary=Apple-Webmail-42--5f6404bb-db80-ed74-850f-f2750516d9ba MIME-Version: 1.0 In-Reply-To: <031FA87E-DCE3-4EA7-BF28-A6A74BCCB4BF@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Webmail-42--5f6404bb-db80-ed74-850f-f2750516d9ba Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; format=flowed We're the IColumn objects passed to the map function o.a.c.db.SuperColumn = instances ?=A0=0A=0AA=0A=0A=0AOn 21 Oct, 2010,at 02:48 AM, Jeremy Hanna wrote:=0A=0A> Have your tried it ?=0A=0A=0Ayes,= with a modified word count example a month or so ago.=0A=0AOn Oct 20, 201= 0, at 3:27 AM, aaron morton wrote:=0A=0A> My understanding of the Hadoop i= ntegration is not great but from what I can see. The code in o.a.c.hadoop.= ColumnFamilyRecordReader does not use a super_column in the ColumnParent s= truct when making the get_range_slices() call. It's just using the ColumnF= amily. =0A> =0A> So I would guess it would include super columns if they w= ere present. And that the IColumns passed to your map function will be ins= tances of o.a.c.db.SuperColumn. =0A> =0A> Have your tried it ?=0A> =0A> Aa= ron=0A> =0A> =0A> =0A> On 20 Oct 2010, at 04:44, Jeremy Hanna wrote:=0A> =0A= >> It's relatively straightforward, the current mapper gets a map of colum= n names to IColumns. The SuperColumn implements the IColumn interface. So = you would probably need both the super column name and the subcolumn name = to get at it, but you just need to cast the IColumn to a super column and = handle it from there.=0A>> =0A>> On Oct 19, 2010, at 10:31 AM, Frank LoVec= chio wrote:=0A>> =0A>>> I have a Hadoop installation working with a cluste= r of 0.7 Beta 2 Nodes, and got the WordCount example to work using the sta= ndard configuration. I have been inserting data into a Super Column (Senso= r) with TimeUUID as the compare type, it looks like this:=0A>>> =0A>>> get= Sensor['DeviceID:Sensor']=0A>>> =3D> (super_column=3D795a4da0-d8ac-11df-9= a2c-12313d06187c,=0A>>> (column=3Dsub_sensor1, value=3D39.742538, timestam= p=3D1287182112633000) =0A>>> (column=3Dsub_sensor2, value=3D-104.912474, t= imestamp=3D1287182112633000) =0A>>> (column=3Dmac_address, value=3DDEADBEE= FFEED, timestamp=3D1287182112633000)) =0A>>> =0A>>> Is there a Word Count = example for super columns? I am trying to count the number of occurrences = of "DEADBEEFFEED", much like "word1" in the column example. =0A>>> =0A>>> = Thanks,=0A>>> =0A>>> Frank LoVecchio=0A>>> Software Engineer, Isidorey LLC= =0A>>> isidorey.com=0A>>> =0A>>> franklovecchio.com=0A>>> rodsandricers.co= m=0A>> =0A> =0A=0A --Apple-Webmail-42--5f6404bb-db80-ed74-850f-f2750516d9ba Content-Type: multipart/related; type="text/html"; boundary=Apple-Webmail-86--5f6404bb-db80-ed74-850f-f2750516d9ba --Apple-Webmail-86--5f6404bb-db80-ed74-850f-f2750516d9ba Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1;
We're the IColumn objects passed to the map function o.a.c.db.SuperCo= lumn instances ? 

A


On 21 = Oct, 2010,at 02:48 AM, Jeremy Hanna <jeremy.hanna1234@gmail.com> wro= te:

> Have your tried it ?
=0A
=0A
=0Ayes, with a modified word= count example a month or so ago.
=0A
=0AOn Oct 20, 2010, at 3:27 AM= , aaron morton wrote:
=0A
=0A> My understanding of the Hadoop int= egration is not great but from what I can see. The code in o.a.c.hadoop.Co= lumnFamilyRecordReader does not use a super_column in the ColumnParent st= ruct when making the get_range_slices() call. It's just using the ColumnFa= mily.
=0A>
=0A> So I would guess it would include super colu= mns if they were present. And that the IColumns passed to your map functio= n will be instances of o.a.c.db.SuperColumn.
=0A>
=0A> Have = your tried it ?
=0A>
=0A> Aaron
=0A>
=0A>
=0A= >
=0A> On 20 Oct 2010, at 04:44, Jeremy Hanna wrote:
=0A> =
=0A>> It's relatively straightforward, the current mapper gets a= map of column names to IColumns. The SuperColumn implements the IColumn = interface. So you would probably need both the super column name and the = subcolumn name to get at it, but you just need to cast the IColumn to a su= per column and handle it from there.
=0A>>
=0A>> On Oct= 19, 2010, at 10:31 AM, Frank LoVecchio wrote:
=0A>>
=0A>&= gt;> I have a Hadoop installation working with a cluster of 0.7 Beta 2 = Nodes, and got the WordCount example to work using the standard configurat= ion. I have been inserting data into a Super Column (Sensor) with TimeUUI= D as the compare type, it looks like this:
=0A>>>
=0A>&= gt;> get Sensor['DeviceID:Sensor']
=0A>>> =3D> (super_co= lumn=3D795a4da0-d8ac-11df-9a2c-12313d06187c,
=0A>>> (column= =3Dsub_sensor1, value=3D39.742538, timestamp=3D1287182112633000)
=0A&g= t;>> (column=3Dsub_sensor2, value=3D-104.912474, timestamp=3D1287= 182112633000)
=0A>>> (column=3Dmac_address, value=3DDEADBE= EFFEED, timestamp=3D1287182112633000))
=0A>>>
=0A>>= > Is there a Word Count example for super columns? I am trying to coun= t the number of occurrences of "DEADBEEFFEED", much like "word1" in the co= lumn example.
=0A>>>
=0A>>> Thanks,
=0A>&= gt;>
=0A>>> Frank LoVecchio
=0A>>> Software En= gineer, Isidorey LLC
=0A>>> isidorey.com
=0A>>>
=0A= >>> franklovecchio.com
=0A>>> rodsandricers= com
=0A>>
=0A>
=0A
=0A
--Apple-Webmail-86--5f6404bb-db80-ed74-850f-f2750516d9ba-- --Apple-Webmail-42--5f6404bb-db80-ed74-850f-f2750516d9ba--