Return-Path: Delivered-To: apmail-incubator-cassandra-dev-archive@minotaur.apache.org Received: (qmail 84589 invoked from network); 30 Jul 2009 21:10:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Jul 2009 21:10:03 -0000 Received: (qmail 47352 invoked by uid 500); 30 Jul 2009 21:10:04 -0000 Delivered-To: apmail-incubator-cassandra-dev-archive@incubator.apache.org Received: (qmail 47323 invoked by uid 500); 30 Jul 2009 21:10:03 -0000 Mailing-List: contact cassandra-dev-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-dev@incubator.apache.org Received: (qmail 47313 invoked by uid 99); 30 Jul 2009 21:10:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jul 2009 21:10:03 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbellis@gmail.com designates 209.85.219.223 as permitted sender) Received: from [209.85.219.223] (HELO mail-ew0-f223.google.com) (209.85.219.223) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jul 2009 21:09:55 +0000 Received: by ewy23 with SMTP id 23so1044268ewy.12 for ; Thu, 30 Jul 2009 14:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=pKSd+vQ4CXqmJulGA4yBuXqUiF4w77vTD2aY9xHsIxg=; b=p1WY6fNFIRSTDc09T4fj5Tjthk+EPJFSlxjsrBxNuBTo7X/XLWSnYOR/mBXk6b6qb/ 7nNCryUNNAliMG53f57IypC7j52OOpuq4QIN8HoRu68MRXVmOeuA6GGsIh3dZC+1Wkt8 maDVefAHjRMrbr8stJuuEWsxJ+FT0AuS58IN4= 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:content-transfer-encoding; b=Eh2/9sl9LmQlZK72kJt6jRIUKTCJfO4TbiAVq+sHW06sgMRP3fQ03XHtsXzRLcGbSa 2HYXaqriFUhmw6IwPvmZPgSlPB4l/nFwy2ArgBvaddSYoKJWJ1wy72I61nN3gVOa7Ubw KajFCIQvLUWPo1mwuWsYtnZwv/ykmyW2uo2TA= MIME-Version: 1.0 Received: by 10.216.53.199 with SMTP id g49mr367992wec.49.1248988173593; Thu, 30 Jul 2009 14:09:33 -0700 (PDT) In-Reply-To: References: Date: Thu, 30 Jul 2009 16:09:33 -0500 Message-ID: Subject: Re: hadoop tasks reading from cassandra From: Jonathan Ellis To: cassandra-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Jul 29, 2009 at 1:37 AM, Jeff Hodges wrote: > Comments inline. > > On Fri, Jul 24, 2009 at 10:00 AM, Jonathan Ellis wrote: >> On Fri, Jul 24, 2009 at 11:08 AM, Jun Rao wrote: >>> 1. In addition to OrderPreservingPartitioner, it would be useful to support >>> MapReduce on RandomPartitioned Cassandra as well. We had a rough prototype >>> that sort-of works at this moment. The difficulty with random partitioner >>> is that it's a bit hard to generate the splits. In our prototype, we simply >>> map each row to a split. This is ok for fat rows (e.g., a row includes all >>> info for a user), but may be too fine-grained for other cases. Another >>> possibility is to generate a split that corresponds to a set of rows in a >>> hash-range (instead of key range). This requires some new apis in >>> cassandra. >> >> -1 on adding new apis to pound a square peg into a round hole. >> >> like range queries, hadoop splits only really make sense on OPP. >> > > Why would it only make sense on OPP? If it wasn't an externally > exposed part of the api, what other concerns do you have about a hash > range query? I can't think of any beyond the usual increased code > complexity argument (i.e. development, testing and maintenance costs > for it). Because you have to violate encapsulation pretty badly and provide ops acting on a hash instead of a key, so you'd be providing a parallel, public api that only applies to the hash partitioner. It's a bad enough hack that I'd say "feel free to maintain that in your own tree, but not in the public repo." :) > There is something in Hadoop that attempts to solve some of the data > locality problem called NetworkTopology. It's used to provide data > locality for CompileFileInputFormat (among, I'm sure, other things). > > Combining this with the knowledge we would have of which Node each key > range would be from, there is a chance Hadoop could do some of the > locality work for us. Looking at the code for CombineFileInputFormat, > it doesn't seem to be particularly straightforward bit of work to > translate to Cassandra, but I'm sure with a little time and maybe a > little guidance from some Hadoop folks, we could make it happen. > > In any case, this seems to be evidence that locality can be added on > later. It will not be a simple drop in deal, but it wouldn't seem to > require us to completely overhaul how we think about the input > splitting. Jun mentioned #197 -- I'm still -1 on adding such a beast to the thrift API, but I think it would be ok to expose it in get_string_property, suitably (json?) encoded. > (Oh, and has anyone got a mnemonic or anything to remember which of > org.apache.hadoop.mapred and org.apache.hadoop.mapreduce is the new > one? I'll be jiggered if I can keep it straight.) mapreduce is the new one. they got lucky and left the full name open for their second try. :) -Jonathan