In the mapper function the process of writing the output doesnot simply involve writing it to the disk. The process involves taking advantage of buffering in memory and presorting in memory for improving efficiency.
Each mapper has a circular memory buffer that it writes the output to. This buffer is defined by "io.sort.mb" and which by default is 100MB.
When the contents of the buffer reaches a certain size defined by the parameter io.sort.spill.percent then the contents of the buffer will be spilled to the disk. Before it writes to the disk a thread divides the data into partitions and performs an in memory sort of keys. If there is a combiner function then it is run on the output of the sort.
Each time the memory buffer reaches the spill threshold, a new spill file is created. So after the map task has completed and its last output has been written, there could be several spill files. The property io.sort.factor says how many of those spill files will be merged into one file at a time.
Before the task is finished the merged into a single partioned and sorted output file.
So if buffer is not filled (may be high io.sort.mb) then the combiner will only run only once at the end of the map task. However if there are multiple spills (affected by io.sort.mb) which is more than io-sort.factor then combiner would be run more than one times.