What is the difference between the ring (circular) buffer and a queue? Both support FIFO so in what scenarios I should use ring buffer over a queue and why?
Relevance to Hadoop
The map phase uses ring buffer to store intermediate key value pairs. What are the reasons for this choice over a queue?
A RingBuffer is an array, which is used as Queue
It will maintain both Read & Write positions separately. When it reach end of Array, it will continue from beginning of Array.
Uses of RingBuffer over Queue.
Have a look at this article by Jakob Jenkov for more details.
Have a look at related SE question :