hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stu Hood" <stuh...@mailtrust.com>
Subject Re: Multiple Output Value Classes
Date Mon, 17 Mar 2008 00:27:10 GMT
Aha! Perfect!

Thank you sir.

-----Original Message-----
From: Riccardo Boscolo <drboscolo@netseer.com>
Sent: Sunday, March 16, 2008 7:08pm
To: core-user@hadoop.apache.org, stuhood@mailtrust.com
Subject: Re: Multiple Output Value Classes


you can extend this class and use it as map output value:



On 3/16/08, Stu Hood <stuhood@mailtrust.com> wrote:
> Hey gang,
> I know that map/reduce functions will accept any subclass of Writable as
> input values if the Mapper/Reducer classes are declared as
> <WritableComparable, Writable, ...>. Then you can use instanceOf to
> determine the type you received.
> But I'm trying to _output_ multiple different value classes from a Mapper,
> and not having any luck. If I declare the Mapper as <...,
> WritableComparable, Writable> for instance, it refuses to accept anything
> other that a Writable as output, and throws a "Type mismatch in value from
> map: expected org.apache.hadoop.io.Writable, received
> org.apache.hadoop.io.Text", even though Writable is only an interface,
> which Text obviously implements.
> Any ideas? At this point, any loophole that would allow me to output 2
> arbitrary subclasses of Writable simultaneously would be great.
> Thanks,
> Stu Hood
> Architecture Software Developer
> Mailtrust, a Division of Rackspace

Riccardo Boscolo, PhD
V.P. of Core Technology
Netseer Inc.
11943 Montana Ave, Suite 200
Los Angeles, CA 90049
T: 310-597-4482
F: 310-597-4489
Email: drboscolo@netseer.com

View raw message