apache / apache/hudi

Executors are not scaling: they are throwing OOM when running sql cdc job for 50 million records in one-time/batch mode

Open
#17,949 1 comment 0 reactions 0 assignees View on GitHub
type:bug
Dominant language
Java
Stars
6.2k
Forks
2.5k
Avg merge
2d 8h
Merged PRs (30d)
111

Description

### Bug Description

**What happened:**
We are trying to ingest 50M kafka records to a hudi table using delta streamer in one-time/batch mode.

**What you expected:**
We are expecting it to scale number of executors when it senses more load since we have not capped/defined maxExecutors in spark.
Following are the spark configs:
```
'spark.executor.memory=6g'
'spark.executor.cores=4'
'spark.dynamicAllocation.minExecutors=1'
'spark.executor.memoryOverhead=2g'
'spark.driver.memory=4g'
'spark.driver.cores=4'
'spark.dynamicAllocation.initialExecutors=1'
```

If we increase executor memory to 15G then it works fine but its not a ideal solution since in production, having 50M records will be a rare scenario. We are expecting hudi to scale the executors in case there are huge amount of data

**Questions:**
1. On what basis it partitions the data to be ingested?
2. Is there any option to define/control number of partitions it creates?

### Environment

**Hudi version:** 0.15.0-amzn-7
**Query engine:** (Spark/Flink/Trino etc) : Trino
**Relevant configs:** Aws EMR 7.10

### Logs and Stack Trace

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

The payload names no source files or tests. Start by reproducing the DeltaStreamer one-time/batch ingestion on EMR with the listed Spark settings and inspect executor and partition behavior for the 50M-record load; done means establishing the expected scaling behavior and documenting how partitions are selected and controlled.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java, kafka, spark
Domain
cloud, data-engineering, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.