ganczarek commented on issue #4675:
URL: https://github.com/apache/hudi/issues/4675#issuecomment-1019941303


   @wjcwin Looking at the documentation, it appears that Hive style 
partitioning was implemented in v0.5.3.
   
   Have you tried creating custom key generator? Please note I'm new to Hudi 
and haven't used v0.5.0, but in theory the following should work:
   1. extend 
[SimpleKeyGenerator](https://github.com/apache/hudi/blob/master/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/SimpleKeyGenerator.java)
 (or whatever key generator you're currently using, SImpleKeyGenerator is 
default) and override `getPartitionPath`. That allows you to control partition 
path. Refer to 
[KeyGenUtils](https://github.com/apache/hudi/blob/cfde45b548fe5c425c0415e45993d4bbec1a1c5a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/KeyGenUtils.java#L156)
 and 
[RowKeyGeneratorHelper](https://github.com/apache/hudi/blob/36790709f76f71e72026f3f54218ea8b8e247ed2/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/RowKeyGeneratorHelper.java#L153)
 to see how it's done in the latest Hudi.
   2. set 
[hoodie.datasource.write.keygenerator.class](https://hudi.apache.org/docs/0.5.0/configurations#keygenerator_class_opt_key)
 with your custom key generator class.
   
   I hope it helps.


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