mzheng-plaid opened a new issue, #11896:
URL: https://github.com/apache/hudi/issues/11896

   **Describe the problem you faced**
   
   We found some old tables that were still table version `2` , these failed 
when trying to be read with Hudi 0.14.1 Spark jobs (could not recognize the 
`hoodie.properties` file).
   
   To remediate I created a Spark job running with Hudi 0.12.2 so that I could 
run the `upgrade table` command to upgrade from table version 2 to table 
version 5 (and then in ingestion this would be upgraded to table version 6 on 
Hudi 0.14.1)
   
   I was surprised to see the key generator class was changed/broken by the CLI:
   
   ```
   
╟─────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ fileSystem                      │ s3                                       
                              ║
   
╟─────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.name               │ ...                                      
                  ║
   
╟─────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.recordkey.fields   │ _id                                      
                              ║
   
╟─────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.type               │ COPY_ON_WRITE                            
                              ║
   
╟─────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.precombine.field   │ published_at                             
                              ║
   
╟─────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.partition.fields   │ dt                                       
                              ║
   
╟─────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.keygenerator.class │ 
org.apache.hudi.keygen.CustomKeyGenerator                              ║
   
╟─────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.populate.meta.fields     │ true                                     
                              ║
   
╟─────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.archivelog.folder        │ archived                                 
                              ║
   
╟─────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.base.file.format   │ PARQUET                                  
                              ║
   
╟─────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.timeline.layout.version  │ 1                                        
                              ║
   
╟─────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.version            │ 2                                        
                              ║
   
╚═════════════════════════════════╧════════════════════════════════════════════════════════════════════════╝
   ```
   
   ```
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ fileSystem                                      │ s3                       
                                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.type                               │ COPY_ON_WRITE            
                                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.precombine.field                   │ published_at             
                                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.partition.fields                   │ dt                       
                                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.archivelog.folder                        │ archived                 
                                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.timeline.layout.version                  │ 1                        
                                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.checksum                           │ 662017575                
                                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.name                               │ ...                      
                                  ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.recordkey.fields                   │ _id                      
                                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.datasource.write.hive_style_partitioning │ false                    
                                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.keygenerator.class                 │ 
org.apache.hudi.keygen.SimpleKeyGenerator                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.populate.meta.fields                     │ true                     
                                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.base.file.format                   │ PARQUET                  
                                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.datasource.write.partitionpath.urlencode │ false                    
                                              ║
   
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────╢
   ║ hoodie.table.version                            │ 5                        
                                              ║
   
╚═════════════════════════════════════════════════╧════════════════════════════════════════════════════════════════════════╝
   ```
   
   **To Reproduce**
   
   Steps to reproduce the behavior:
   
   Create a table on Hudi 0.9.0, then run `upgrade table` to table version 5.
   
   **Expected behavior**
   
   The key generator should _not_ be overwritten.
   
   **Environment Description**
   
   * Hudi version : 0.12.2
   
   * Spark version : 3.3.1
   
   * Hive version :
   
   * Hadoop version :
   
   * Storage (HDFS/S3/GCS..) :
   
   * Running on Docker? (yes/no) :
   
   
   **Additional context**
   
   This was done on EMR
   
   
   


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