[Feature Request]: Iceberg IO Hash Distribution Mode Support for Spark Based Runners
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
### What would you like to happen?
In Beam's latest release 2.74.0, Hash Distribution Mode and AutoSharding for ICEBERG IO WRITES were enabled via this [PR 38061](https://github.com/apache/beam/pull/38061).
This PR introduced a new transform WriteToPartitions (file WriteToPartitions.java, new in 2.74.0) and this file uses GroupIntoBatches Transform which is not supported in Spark Runners as Spark Runner does not support **@OnWindowExpiration** annotation (States and Timers) which is why i m unable to use the new feature in Spark Runner.
When i use SparkStructuredStreamingRunner, the code fails at [this line](https://github.com/apache/beam/blob/c01ceeab24c7cae7167dbc08b21529339659094f/runners/spark/src/main/java/org/apache/beam/runners/spark/structuredstreaming/translation/batch/ParDoTranslatorBatch.java#L91)
When i use SparkRunner, the code fails at [this line](https://github.com/apache/beam/blob/c01ceeab24c7cae7167dbc08b21529339659094f/runners/spark/src/main/java/org/apache/beam/runners/spark/translation/TransformTranslator.java#L412)
Is there a workaround or solve for Spark Runner Users to use the "hash" distribution mode with "autoSharding" for Iceberg Writes using Beam.
### Issue Priority
Priority: 2 (default / most feature requests should be filed as P2)
### Issue Components
- [ ] Component: Python SDK
- [x] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam YAML
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Infrastructure
- [x] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Prism Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner
Contributor guide
Assessment
This issue has not been assessed yet.