You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "rangareddy (via GitHub)" <gi...@apache.org> on 2026/08/27 05:16:59 UTC

Re: [I] Engine type is spark by default in the writeconfig [hudi]

rangareddy commented on issue #16655:
URL: https://github.com/apache/hudi/issues/16655#issuecomment-5434694549

   This issue was reviewed as part of the JIRA-migrated backlog triage (HUDI-8305).
   
   **Findings: confirmed on `master`, and it is more than a tidiness issue.**
   
   In `hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java`:
   
   ```java
   :1044  private final EngineType engineType;
   ...
   :1403    this.engineType = EngineType.SPARK;      // constructor that takes no engineType
   :1407  protected HoodieWriteConfig(EngineType engineType, Properties props)   // explicit constructor
   ```
   
   So both paths coexist, and a config built through the first silently claims to be Spark regardless of the actual engine.
   
   That has real consequences rather than just being untidy: `engineType` feeds actual decisions - for example `:1453` passes it into record-merger resolution - so a Flink or Java caller that ends up on the defaulting constructor gets Spark-flavoured behaviour with no error raised.
   
   Your proposed fix (require it, no default) is the right shape. The one thing to check first is whether any caller outside this repo depends on the no-arg path, since `HoodieWriteConfig` is client-facing - that determines whether this needs a deprecation cycle or can be a straight removal.
   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org