cshuo commented on code in PR #18824:
URL: https://github.com/apache/hudi/pull/18824#discussion_r3302236221
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieMetadataWriteUtils.java:
##########
@@ -279,6 +298,21 @@ public static HoodieWriteConfig createMetadataWriteConfig(
.withWriteConcurrencyMode(concurrencyMode)
.withLockConfig(lockConfig);
+ // Inherit spillable-map / memory configs so user overrides (e.g.
+ // hoodie.common.spillable.diskmap.type=ROCKS_DB) actually reach the MDT
+ // writer/compactor. Guarded by containsKey so that configs without
defaults
+ // (e.g. SPILLABLE_MAP_BASE_PATH, MAX_MEMORY_FOR_COMPACTION) aren't forged
+ // into "user-set" on the MDT side when the user hasn't set them.
+ Properties spillableMapProperties = new Properties();
+ Properties dataTableProps = writeConfig.getProps();
+ for (ConfigProperty<?> inheritedConfig :
MDT_INHERITED_SPILLABLE_MAP_CONFIGS) {
+ if (dataTableProps.containsKey(inheritedConfig.key())) {
+ spillableMapProperties.setProperty(inheritedConfig.key(),
+ dataTableProps.getProperty(inheritedConfig.key()));
Review Comment:
`HoodieWriteConfig` can contain non-string `Properties` values, and Hudi’s
normal config accessors handle them via raw `get(...)` + `toString()`. This
code uses `getProperty(...)`, which returns `null` for non-string values, so
`setProperty(key, null)` can throw `NullPointerException`.
-> `dataTableProps.get(inheritedConfig.key()).toString()`
--
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]