vinothchandar commented on issue #2515:
URL: https://github.com/apache/hudi/issues/2515#issuecomment-772991754


   @rubenssoto I tried to reproduce this locally. the commit.requested file, 
actually has no content. So its all an empty record that gets  logged. 
   
   the conversion from pojo to avro model, seems to explicitly handle the null 
problem you encountered. Are you sure you are running with 0.7.0. I ask since 
users have tried to do this at times but end up picking up older jars from EMR
   
   ```
   public static org.apache.hudi.avro.model.HoodieCommitMetadata 
convertCommitMetadata(
         HoodieCommitMetadata hoodieCommitMetadata) {
       ObjectMapper mapper = new ObjectMapper();
       // Need this to ignore other public get() methods
       mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, 
false);
       org.apache.hudi.avro.model.HoodieCommitMetadata avroMetaData =
           mapper.convertValue(hoodieCommitMetadata, 
org.apache.hudi.avro.model.HoodieCommitMetadata.class);
       // Do not archive Rolling Stats, cannot set to null since AVRO will 
throw null pointer
       
avroMetaData.getExtraMetadata().put(HoodieRollingStatMetadata.ROLLING_STAT_METADATA_KEY,
 "");
       return avroMetaData;
     }
   ```
   
   
   


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