hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anuja Kulkarni <anujakulkarn...@yahoo.com>
Subject Can we use Inheritance hierarchy to specify the outputvalue class for mapper which is also inputvalue class for the reducer ?
Date Tue, 04 Oct 2011 16:46:57 GMT
Hi,

We have class hierarchy for output value for both mapper as well as reducer class   as parent
(abstract class) , child1,child2,… 
 
We have mapper class which is 
specified with its outputvalue class as parent class ; the map function 
will emit  either  child1 or child2 depending on the logic we used ( 
and reducer is having its inputvalue class as parent class).
 
But we are getting error as  "java.io.IOException: Type mismatch in value from map: expected
parent classreceived child class”
 So is this possible to specify parent class as output/inputvalue class in case of mapper
as well as in reducer ; since we want to follow some object-oriented approach. What will be
the correct way of achieving this ?


- Anuja

Mime
View raw message