Github user tdas commented on the pull request:
https://github.com/apache/spark/pull/6614#issuecomment-109468147
Good point. I think the solution is to make the CountingIterator verify
whether the end of the internal iterator was reached or not (that is hasNext
had returned false or not). Accordingly we will know whether the count is
correct or not. In cases where the count is in complete (e.g. MEMORY_ONLY, with
not enough memory), the count can be ignored because in those cases the block
was not successfully put into the memory. And so the count can be considered to
be zero. In fact ideally we should be throwing exceptions saying that block
could not be inserted in the block manager.
Does that make sense?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]