You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/08/19 19:55:38 UTC

[GitHub] [hudi] pratyakshsharma commented on a change in pull request #1987: [HUDI-1177]: fixed TaskNotSerializableException in TimestampBasedKeyGenerator

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



##########
File path: hudi-spark/src/main/java/org/apache/hudi/keygen/TimestampBasedKeyGenerator.java
##########
@@ -153,7 +147,8 @@ public String getPartitionPath(GenericRecord record) {
    * @return the parsed partition path based on data type
    * @throws ParseException on any parse exception
    */
-  private String getPartitionPath(Object partitionVal) throws ParseException {
+  private String getPartitionPath(Object partitionVal) {
+    DateTimeFormatter inputFormatter = parser.getInputFormatter();

Review comment:
       I did not get this check, if (inputFormatter != null) then why are we re-initialising? Ok, you mean to say the variable will be marked transient and will still get initialised in constructor? `initIfNeeded()` gets called from `getPartitionPath()` then? Please help me understand. @vinothchandar 




----------------------------------------------------------------
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:
users@infra.apache.org