prashantwason commented on code in PR #17467:
URL: https://github.com/apache/hudi/pull/17467#discussion_r2684798716


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/HoodieStreamer.java:
##########
@@ -188,8 +188,10 @@ public static TypedProperties combineProperties(Config 
cfg, Option<TypedProperti
       hoodieConfig.setAll(propsOverride.get());
     } else if (cfg.propsFilePath.equals(Config.DEFAULT_DFS_SOURCE_PROPERTIES)) 
{
       hoodieConfig.setAll(UtilHelpers.getConfig(cfg.configs).getProps());
-    } else {
+    } else if (!StringUtils.isNullOrEmpty(cfg.propsFilePath)) {
       hoodieConfig.setAll(readConfig(hadoopConf, new Path(cfg.propsFilePath), 
cfg.configs).getProps());
+    } else {
+      hoodieConfig.setAll(UtilHelpers.getConfig(cfg.configs).getProps());

Review Comment:
   Thanks for the review @yihua!
   
   I've addressed both comments:
   
   1. **PR Title**: Updated to follow the Conventional Commits format: 
`fix(utilities): Use passed-in configs when propsFilePath is null or empty in 
HoodieStreamer`
   
   2. **Test Cases**: Added three new test cases in 
`TestHoodieStreamerUtils.java` to cover the new branches:
      - `testCombinePropertiesWithNullPropsFilePath` - Tests when 
`propsFilePath` is `null`
      - `testCombinePropertiesWithEmptyPropsFilePath` - Tests when 
`propsFilePath` is empty string `""`
      - `testCombinePropertiesWithPropsOverride` - Tests that `propsOverride` 
takes precedence



-- 
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]

Reply via email to