yihua opened a new pull request #5209:
URL: https://github.com/apache/hudi/pull/5209
## What is the purpose of the pull request
Before this change, `hoodie.bloom.index.parallelism` is used as the
parallelism for generating bloom filter index in metadata table. Since the
default value of the config is 0, when generating the metadata bloom filter
records, the method below always uses parallelism as 1, which does not work
well for large batch ingestion. The reason why it has default of 0 is that in
the non-metadata-table bloom filter flow, the parallelism can be automatically
figured out based on the shuffle parallelism.
`HoodieTableMetadataUtil.convertMetadataToBloomFilterRecords()`:
```
final int parallelism = Math.max(Math.min(allWriteStats.size(),
recordsGenerationParams.getBloomIndexParallelism()), 1);
HoodieData<HoodieWriteStat> allWriteStatsRDD =
context.parallelize(allWriteStats, parallelism);
return allWriteStatsRDD.flatMap(hoodieWriteStat -> {<bloom filter records>})
```
This PR adds a separate parallelism config,
`hoodie.metadata.index.bloom.filter.parallelism`, for generating bloom filter
index in metadata table, since the shuffle parallelism cannot be infered here.
## Brief change log
- Adds `hoodie.metadata.index.bloom.filter.parallelism` config and passes
that to the `MetadataRecordsGenerationParams`
## Verify this pull request
This PR is verified by running a Deltastreamer with bloom filter partition
enabled in metadata table. Without this change, the job cannot finish due to
OOM. With this change, from the Spark UI, there's parallelism when generating
bloom filter records in the metadata table and the job succeeds.
## Committer checklist
- [ ] Has a corresponding JIRA in PR title & commit
- [ ] Commit message is descriptive of the change
- [ ] CI is green
- [ ] Necessary doc changes done or have another open PR
- [ ] For large changes, please consider breaking it into sub-tasks under
an umbrella JIRA.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]