FileInputFormat where filename is KEY and text contents are VALUE
问题 I'd like to use an entire file as a single record for MAP processing, with the filename as the key. I've read the following post: How to get Filename/File Contents as key/value input for MAP when running a Hadoop MapReduce Job? and while the theory of the top answer is solid, no code or "how-to" is actually provided. Here is my custom FileInputFormat and the corresponding RecordReader , which compile, yet do not produce ANY record data. Thanks for any help. public class CommentsInput extends