Doing something before map task starting
<p>I'm currently using hadoop to process a counting task for a large dataset(around 3 gigs).I need to count something which fills in the same time slot.For example: counting the number of records which have time tags between 3am and 4am. I need the output to be continuous.If there is no record in certain time slot, I still want to keep it in the output,like [3am~4am, 0 records].</p>

<p>To accomplish this,I came up with an idea that I can put all the time slots with values of 0 into the mapping output before map task starts. But I tried google and I couldn't find solutions.</p>

<p>So is there any way I can output something before the map task starts? I will also appreciate for any new ideas to achieve the aim.
Thanks</p>