hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Dechoux <decho...@gmail.com>
Subject Re: setOutputValueClass(*.class) method
Date Thu, 11 Oct 2012 18:12:13 GMT
Hi Andy,

It should be called within the setup of your job and it should NOT be
called within the Mapper.
You could compile the call within the mapper of course. At best it should
do nothing. I would say in practice the job will fail. But that's something
that you have to verify if you are curious.

Back to your original problem, the mapper need to output the same kind of
object in order to be able to unserialize them for the mapper. (More
generally the serialization strategy must be able to figure out what was
serialized.) It does not mean your problem is not solvable but it means
that you will need to come up with a wrapper or a common structure.

How do you read different kind of objects with the Mapper? Maybe you could
use the same approach.



On Thu, Oct 11, 2012 at 7:49 PM, Kartashov, Andy <Andy.Kartashov@mpac.ca>wrote:

>    Guys,
> Is there another way to set the output from within the Mapper?
> My Mapper reads from various serialised files and generates different type
> of objects for values depending on the returned value of instanceof. I
> wanted to change the class name within the Mapper as opposed to the driver
> class. Anyway of doing it?
> Thanks,
> Andy
>  NOTICE: This e-mail message and any attachments are confidential,
> subject to copyright and may be privileged. Any unauthorized use, copying
> or disclosure is prohibited. If you are not the intended recipient, please
> delete and contact the sender immediately. Please consider the environment
> before printing this e-mail. AVIS : le présent courriel et toute pièce
> jointe qui l'accompagne sont confidentiels, protégés par le droit d'auteur
> et peuvent être couverts par le secret professionnel. Toute utilisation,
> copie ou divulgation non autorisée est interdite. Si vous n'êtes pas le
> destinataire prévu de ce courriel, supprimez-le et contactez immédiatement
> l'expéditeur. Veuillez penser à l'environnement avant d'imprimer le présent
> courriel

Bertrand Dechoux

View raw message