Details
-
Improvement
-
Status: Resolved
-
P2
-
Resolution: Fixed
-
None
-
None
Description
The SparkRunner uses mapWithState to read and manage CheckpointMarks, and this stateful operation will be followed by a shuffle:
https://github.com/apache/spark/blob/master/streaming/src/main/scala/org/apache/spark/streaming/dstream/MapWithStateDStream.scala#L159
Since the stateful read maps "splitSource" -> "partition of a list of read values", the following shuffle won't benefit in any way (the list of read values has not been flatMapped yet). In order to avoid shuffle we need to set the input RDD (SourceRDD.Unbounded) partitioner to be a default HashPartitioner since mapWithState would use the same partitioner and will skip shuffle if the partitioners match.
Attachments
Issue Links
- relates to
-
BEAM-848 Shuffle input read-values to get maximum parallelism.
- Resolved
- links to