Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Explain process of spilling in Hadoop’s map reduce program?

Highlighted

Explain process of spilling in Hadoop’s map reduce program?

New Contributor

What is the process of spilling in Hadoop’s map reduce program?

1 REPLY 1

Re: Explain process of spilling in Hadoop’s map reduce program?

New Contributor

When the mapper starts producing the intermediate output it does not directly write the data on the local disk. Rather it writers the data in memory and some sorting of the data (Quick Sort) happens for performance reasons.


Each map task has a circular memory buffer which it writes the output to. By default, this circular buffer is of 100 MB. It can be modified by the parameter mapreduce.task.io.sort.mb.

When the contents of the buffer reach a certain threshold size (MapReduce.map.sort.spill.percent, which has the default value 0.80, or 80%), a background thread will start to spill the contents to disk. Map outputs will continue to be written to the buffer while the spill takes place, but if the buffer fills up during this time, the map will block until the spill is complete.

Don't have an account?
Coming from Hortonworks? Activate your account here