Skip to content

[HUDI-9473] Set memory config properly for FileGroup reader in Flink …#13372

Merged
danny0405 merged 2 commits intoapache:masterfrom
cshuo:HUDI-9473
May 30, 2025
Merged

[HUDI-9473] Set memory config properly for FileGroup reader in Flink …#13372
danny0405 merged 2 commits intoapache:masterfrom
cshuo:HUDI-9473

Conversation

@cshuo
Copy link
Collaborator

@cshuo cshuo commented May 29, 2025

…reader

Change Logs

Set memory config properly for FileGroup reader in Flink reader

Impact

Correct the memory conf for FileGroup reader

Risk level (write none, low medium or high below)

low

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@cshuo
Copy link
Collaborator Author

cshuo commented May 29, 2025

PATL when you have time. cc @danny0405

instantRangeOption);
final TypedProperties typedProps = FlinkClientUtil.getMergedTableAndWriteProps(metaClient.getTableConfig(), writeConfig);
typedProps.put(HoodieReaderConfig.MERGE_TYPE.key(), mergeType);
typedProps.put(HoodieMemoryConfig.MAX_MEMORY_FOR_MERGE.key(), maxMemoryInBytes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it already be include in the writeConfig?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And there are 5 options related with the spillable map:

.withMaxMemorySizeInBytes(metadataConfig.getMaxReaderMemory())
        .withBufferSize(metadataConfig.getMaxReaderBufferSize())
        .withSpillableMapBasePath(metadataConfig.getSplliableMapDir())
        .withDiskMapType(commonConfig.getSpillableDiskMapType())
        .withBitCaskDiskMapCompressionEnabled(commonConfig.isBitCaskDiskMapCompressionEnabled())

Copy link
Collaborator Author

@cshuo cshuo May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it already be include in the writeConfig?

Yes, config MAX_MEMORY_FOR_MERGE is already in writeConfig, and is configured as the value of FlinkOptions#WRITE_MERGE_MAX_MEMORY, but Flink reader before actually use FlinkOptions#COMPACTION_MAX_MEMORY as the size of merging memory (stored in MergeOnReadInputSplit#maxCompactionMemoryInBytes), so this pr is align the memory configuration as before.

And there are 5 options related with the spillable map:

These configurations are in writeConfig, and are not set explicitly through flink conf (except for MaxMemorySizeInBytes), so value for there configurations are aligned with before.

@github-actions github-actions bot added the size:S PR with lines of changes in (10, 100] label May 29, 2025
@hudi-bot
Copy link
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@danny0405 danny0405 merged commit 6e767fe into apache:master May 30, 2025
54 of 58 checks passed
alexr17 pushed a commit to alexr17/hudi that referenced this pull request Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S PR with lines of changes in (10, 100]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants