haoxie-aws opened a new issue, #7541:
URL: https://github.com/apache/hudi/issues/7541

   **_Tips before filing an issue_**
   
   - Have you gone through our [FAQs](https://hudi.apache.org/learn/faq/)?
   
   - Join the mailing list to engage in conversations and get faster support at 
[email protected].
   
   - If you have triaged this as a bug, then file an 
[issue](https://issues.apache.org/jira/projects/HUDI/issues) directly.
   
   **Describe the problem you faced**
   
   I have a table that has 75k partitions, and each partition has only a couple 
of parquet files. It can take up to 20 minutes to create a savepoint for a 
recent commit of this table.
   
   This is the scala code I use to create savepoint.
   
   ```
       val config = HoodieWriteConfig
         .newBuilder()
         .withPath(basePath)
         .withRollbackUsingMarkers(false)
         .withCleanConfig(
           HoodieCleanConfig
             .newBuilder()
             
.withFailedWritesCleaningPolicy(HoodieFailedWritesCleaningPolicy.EAGER)
             .build()
         )
         
.withMetadataConfig(HoodieMetadataConfig.newBuilder().enable(true).build())
         .build()
       val context = new HoodieSparkEngineContext(new 
JavaSparkContext(sparkContext))
       val hudiClient = new SparkRDDWriteClient(context, config)
       hudiClient.savepoint(commitTimestamp, SAVEPOINT_USER, SAVEPOINT_COMMENT)
   ```
   I added S3 metric filters on the table path and its metadata path 
(`<table_path>/.hoodie/metadata/`), and observed that during savepointing, 
there were 3 million requests to the metadata path and very few to non-metadata 
paths. During savepointing, Hudi downloaded 190GB data from metadata path, but 
the total size of metadata path was 4.3MB and there wasn't any write request to 
it.
   
   To me it feels like a huge inefficiency. Shall we either create a in-memory 
cache for metadata, or to remove redundant S3 requests when list files or 
partitions?
   
   **To Reproduce**
   
   Steps to reproduce the behavior:
   
   1. Create a table with many partitions
   2. Create a savepoint for the table
   
   **Expected behavior**
   
   A clear and concise description of what you expected to happen.
   
   **Environment Description**
   
   * Hudi version : 0.12.1
   
   * Spark version : 3.1
   
   * Hive version :N/A
   
   * Hadoop version :2.10.1
   
   * Storage (HDFS/S3/GCS..) :S3
   
   * Running on Docker? (yes/no) :no
   
   
   **Additional context**
   
   Add any other context about the problem here.
   
   **Stacktrace**
   
   ```Add the stacktrace of the error.```
   
   


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