Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 91468 invoked from network); 9 Apr 2007 18:12:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Apr 2007 18:12:24 -0000 Received: (qmail 7508 invoked by uid 500); 9 Apr 2007 18:12:29 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 7472 invoked by uid 500); 9 Apr 2007 18:12:29 -0000 Mailing-List: contact hadoop-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-dev@lucene.apache.org Received: (qmail 7463 invoked by uid 99); 9 Apr 2007 18:12:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2007 11:12:29 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [209.151.94.5] (HELO megs8.100mwh.com) (209.151.94.5) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2007 11:12:21 -0700 Received: from meetsawglad.corp.yahoo.com ([66.228.162.219]) by megs8.100mwh.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.52) id 1HayLS-000418-4A for hadoop-dev@lucene.apache.org; Mon, 09 Apr 2007 12:12:02 -0600 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: References: <460AB81D.7040708@yahoo-inc.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Owen O'Malley Subject: Re: Java 1.5? Date: Mon, 9 Apr 2007 11:11:58 -0700 To: hadoop-dev@lucene.apache.org X-Mailer: Apple Mail (2.752.2) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - megs8.100mwh.com X-AntiAbuse: Original Domain - lucene.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - yahoo-inc.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org On Apr 8, 2007, at 1:48 AM, Tom White wrote: > I think we can do a lot to improve the use of generics, particularly > in MapReduce. > <... use generics in interfaces ...> I like it. I was thrown off at first because classes aren't specialized based on their template parameters, but specialization of the parent class is available. > Reducer would be changed similarly, although I'm not sure how we could > constrain the output types of the Mapper to be the input types of the > Reducer. Perhaps via the JobConf? That is easy, actually. In the JobClient, we'd just check to see if the types all play well together. Basically, you need: K1,V1 -> map -> K2, V2 K2, V2 -> combiner -> K2, V2 (if used) K2, V2 -> reduce -> K3, V3 It will be a tricky bit of specification to decide exactly what the right semantics are, since even with the generics, the application isn't required to define them. Therefore, we have 5 places where we could find a value for K2 (config, mapper output, combiner input, combiner output, or reduce input). Clearly all classes must be checked for consistency once Hadoop decides what the right values are for each type. The other piece that this interacts with is the desire to use context objects in the parameter list. However, they appear to be orthogonal to each other. -- Owen