In Spark 2 + Java + RDD api, the use of iterables was replaced with iterators. I just encountered an inconsistency in `flatMapValues` that may be a bug:
`flatMapValues` (https://github.com/apache/spark/blob/master/core/src/ main/scala/org/apache/spark/api/java/JavaPairRDD.scala#L677) takes a `FlatMapFunction` ( https://github.com/apache/spark/blob/39e2bad6a866d27c3ca594d15e574a1da3ee84cc/core/src/main/java/org/apache/spark/api/java/function/FlatMapFunction.java ) The problem is that `FlatMapFunction` was changed to return an iterator, but `rdd.flatMapValues` still expects an iterable. Am I using these constructs correctly? Is there a workaround other than converting the iterator to an iterable outside of the function? Thanks, -- Asher Krim Senior Software Engineer