0

Why it is impossible to iterate over the reducer values more than once?

I saw this answer: Iterate twice on values

But what I don't understand is what happens if one iterator is in memory and the other is in disk?

why doest Iterator<..> x = ReducerValues.iterator(); and Iterator<..> y = ReducerValues.iterator();

will give the same one?

Community
  • 1
  • 1
Daniella
  • 383
  • 1
  • 4
  • 12
  • 1
    I suggest you reading that answer http://stackoverflow.com/a/4425156/977194 – gimpycpu Dec 29 '14 at 09:50
  • I already read that. What I don't understand is the phrase: "If you have two independent copies of the iterator, then you can have one of them far ahead of the other which implies that the data between where the two iterators point can't be dropped." – Daniella Dec 29 '14 at 15:54

0 Answers0