You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Mohamed Riadh Trad <Mo...@inria.fr> on 2011/11/24 18:20:26 UTC

Customized TextInputFormat

Hi All,

Is possible to customize the TextInputFormat in a way that it return the same line n times but with different keys, as for example it returns the same line but with different start positions?

Bests,


Trad Mohamed Riadh, M.Sc, Ing.
PhD. student
INRIA-TELECOM PARISTECH - ENPC School of International Management

Office: 11-15
Phone: (33)-1 39 63 59 33
Fax: (33)-1 39 63 56 74
Email: riadh.trad@inria.fr
Home page: http://www-rocq.inria.fr/who/Mohamed.Trad/


Re: Customized TextInputFormat

Posted by be...@gmail.com.
Hi Riadh
        I'm not sure on the customization to achieve that goal, but it should be possible. But if your requirement is to output the same line n number of times as the map output, you don't need to go that way. Just call the outputCollector.collect() or context.write() within a loop in your map method. If you could post in your requirement then may be we can help you better.

       
Regards
Bejoy K S

-----Original Message-----
From: Mohamed Riadh Trad <Mo...@inria.fr>
Date: Thu, 24 Nov 2011 18:20:26 
To: <ma...@hadoop.apache.org>
Reply-To: mapreduce-user@hadoop.apache.org
Subject: Customized TextInputFormat

Hi All,

Is possible to customize the TextInputFormat in a way that it return the same line n times but with different keys, as for example it returns the same line but with different start positions?

Bests,


Trad Mohamed Riadh, M.Sc, Ing.
PhD. student
INRIA-TELECOM PARISTECH - ENPC School of International Management

Office: 11-15
Phone: (33)-1 39 63 59 33
Fax: (33)-1 39 63 56 74
Email: riadh.trad@inria.fr
Home page: http://www-rocq.inria.fr/who/Mohamed.Trad/