On Thu, May 7, 2009 at 11:10 PM, Foss User <foss...@gmail.com> wrote:
> Sometimes I would like to just execute a certain method in all nodes. > The method does not need inputs. So, there is no need of any > InputFormat implementation class. So, I would want to just write a > Mapper implementation class with a map() method. But, the problem with > map() method is that it always needs inputs. How do I avoid this? > You can always implement your own InputFormat class - just make getSplits return whatever number of splits you want (which you can just ignore). Then make getRecordReader return a RecordReader implementation that outputs a single NullWritable, NullWritable key. -Todd