You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Patrick Grandjean (Jira)" <ji...@apache.org> on 2020/08/28 02:03:00 UTC

[jira] [Comment Edited] (SPARK-32716) Add function mapPartitionsWithInputSplitAndIndex to NewHadoopRDD

    [ https://issues.apache.org/jira/browse/SPARK-32716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17186202#comment-17186202 ] 

Patrick Grandjean edited comment on SPARK-32716 at 8/28/20, 2:02 AM:
---------------------------------------------------------------------

Yes, but not something that provides both the partition index AND the input split. Moreover, HadoopPartition is private since 2.0.


was (Author: pgrandjean):
Yes, but not something that provides both the partition index AND the input split.

> Add function mapPartitionsWithInputSplitAndIndex to NewHadoopRDD
> ----------------------------------------------------------------
>
>                 Key: SPARK-32716
>                 URL: https://issues.apache.org/jira/browse/SPARK-32716
>             Project: Spark
>          Issue Type: New Feature
>          Components: Spark Core
>    Affects Versions: 3.0.0
>            Reporter: Patrick Grandjean
>            Priority: Major
>
> This is a proposal to add the following function to NewHadoopRDD:
> {code:java}
> def mapPartitionsWithInputSplitAndIndex[U: ClassTag](
>     f: (InputSplit, Int, Iterator[(K, V)]) => Iterator[U],
>     preservesPartitioning: Boolean = false
> ): RDD[U]
> {code}
> This new function would provide the input split with its partition index.
> Having the partition index may be useful when trying to determine the mapping between part-XXXXX files and input splits.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org