pratyakshsharma commented on a change in pull request #2093:
URL: https://github.com/apache/hudi/pull/2093#discussion_r492971849



##########
File path: 
hudi-spark/src/main/java/org/apache/hudi/keygen/CustomKeyGenerator.java
##########
@@ -58,6 +59,7 @@
 
   public CustomKeyGenerator(TypedProperties props) {
     super(props);
+    this.props = props;

Review comment:
       @yanghua due to serialization and `config` field being transient, the 
issue is happening. In CustomKeyGenerator, we try to initialise new object of 
SimpleKeyGenerator and TimestampBasedKeyGenerator using config object, that is 
where NPE occurs. The only good way I can think of is to introduce a 
TimestampBasedKeyGenerator object in CustomKeyGenerator and call 
`getPartitionPath` method using this object. Let me do the changes here. 




----------------------------------------------------------------
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:
[email protected]


Reply via email to