[ 
https://issues.apache.org/jira/browse/HUDI-5761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17707972#comment-17707972
 ] 

xiaochen zhou commented on HUDI-5761:
-------------------------------------

Hi, I am trying to complete this issue, but there is some confusion in the 
process of completing the issue, how to get the "*_type" value elegantly, the 
implementation method I can think of now is to correspond to a method for each 
"_type" Value, like this
     switch (keyGeneratorTypeEnum) {
       case SIMPLE:
         return new SimpleAvroKeyGenerator(props);
       case COMPLEX:
         return new ComplexAvroKeyGenerator(props);
       case TIMESTAMP:
         return new TimestampBasedAvroKeyGenerator(props);
       case CUSTOM:
         return new CustomAvroKeyGenerator(props);
       case NON_PARTITION:
         return new NonpartitionedAvroKeyGenerator(props);
       case GLOBAL_DELETE:
         return new GlobalAvroDeleteKeyGenerator(props);
       default:
         throw new HoodieKeyGeneratorException("Unsupported keyGenerator Type " 
+ keyGeneratorType);
     }
By the way, can you assign this ticket to me? I will try my best to complete it

> Create "Type" configs for current configs that take in classes
> --------------------------------------------------------------
>
>                 Key: HUDI-5761
>                 URL: https://issues.apache.org/jira/browse/HUDI-5761
>             Project: Apache Hudi
>          Issue Type: Improvement
>          Components: configs
>            Reporter: Jonathan Vexler
>            Priority: Major
>             Fix For: 0.14.0
>
>
> Take for example `hoodie.datasource.write.keygenerator.type` and its 
> counterpart `hoodie.datasource.write.keygenerator.class`. We should make 
> configs like keygenerator.type for configs currently like keygenerator.class. 
> Take for example `hoodie.datasource.write.record.merger.impls`. If you want 
> HoodieAvroRecordMerger you need to set the value to 
> org.apache.hudi.common.model.HoodieAvroRecordMerger. However, if you want 
> HoodieSparkRecordMerger, the full class path is 
> org.apache.hudi.HoodieSparkRecordMerger. Differences like this are an easy 
> cause for mistakes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to