wangxianghu commented on a change in pull request #3006: URL: https://github.com/apache/hudi/pull/3006#discussion_r642206247
########## File path: hudi-flink/src/main/java/org/apache/hudi/util/StreamerUtil.java ########## @@ -242,7 +242,9 @@ public static TypedProperties flinkConf2TypedProperties(Configuration conf) { properties.put(option.key(), option.defaultValue()); } } - return new TypedProperties(properties); + TypedProperties typeProps = new TypedProperties(); + typeProps.putAll(typeProps); Review comment: > hi @wangxianghu , Yeah,you are right, it should be `typeProps.putAll(properties)`. > I fix this problems cause by the code > > ``` > public Builder withProps(Map kvprops) { > props.putAll(kvprops); > return this; > } > ``` > > which invoked by `StreamerUtil`.`getHoodieClientConfig`, > `withProps` use `putAll` method which only in interface `Map`,but if we create `TypeProperties` use > > ``` > public TypedProperties(Properties defaults) { > super(defaults); > } > ``` > > the `kvprops` will be empty because the actually value contained in the field `defaults`. Sorry, I don't understand what you mean. can you paste the exception you met? The test below passed in my local. ``` @Test public void TestTypedProperties () { Properties prop = new Properties(); prop.put("hudi","hoodie"); TypedProperties typedProperties = new TypedProperties(prop); Assert.assertEquals("hoodie", typedProperties.getString("hudi")); typedProperties.put("hudi","hudi"); Assert.assertEquals("hudi", typedProperties.getString("hudi")); } ``` -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org