apache / apache/beam

Reshuffle causes brittle pipelines on Spark runner

Open
#19,160 0 comments 0 reactions 0 assignees View on GitHub
bug P3 runners spark
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

The latest Spark releases have a bug which makes calls to `repartition` non-retriable (https://issues.apache.org/jira/browse/SPARK-25341) as a fix to https://issues.apache.org/jira/browse/SPARK-23243. Beam uses repartition as the implementation of `Reshuffle`. This makes beam-based spark pipelines not resilient when using `Reshuffle` - a single executor failure kills the entire pipeline.

The fix that I have locally is just to remove the special-casing of `Reshuffle` in the spark runner (https://github.com/apache/beam/blob/279a05604b83a54e8e5a79e13d8761f94841f326/runners/spark/src/main/java/org/apache/beam/runners/spark/translation/TransformTranslator.java#L579). The reshuffle default expansion seems to do a fine job in reshuffling & the pipeline becomes resilient to executor failures.

I'm not entirely sure if this is a beam bug or not, but I figure it's worth making others aware of the current behavior.

Imported from Jira [BEAM-5682](https://issues.apache.org/jira/browse/BEAM-5682). Original Jira may contain additional context.
Reported by: mikekap.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.