I don't think that you can using those classes. If you look at TextInputFormat and LineRecordReader, they should not be hard to use as a basis for copying into your own version which uniques the IDs but I presume you would need to make them Text and not LongWritable keys.
Just a thought... Rather than going that route, could you construct the new key in the Map? Just because the LineRecordReader passes this as the input key, does not mean you have to use it as the output key in the Map phase. Perhaps concatenate it with a different field? Cheers, Tim On Mon, May 4, 2009 at 9:46 PM, Rares Vernica <ra...@ics.uci.edu> wrote: > Hello, > > TextInputFormat is a perfect match for my problem. The only drawback is > that fact that keys are unique only within a file. Is there an easy way > to have keys unique across files. That is, each line in any file should > get a unique key. Is there an unique id for each file? If yes, maybe I > can concatenate them if I can access the file id from the map function. > > Thanks, > Rares >