You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "the-other-tim-brown (via GitHub)" <gi...@apache.org> on 2023/12/04 16:55:04 UTC

[PR] [MINOR] Allow removal of column stats from metadata table for externally created files [hudi]

the-other-tim-brown opened a new pull request, #10238:
URL: https://github.com/apache/hudi/pull/10238

   ### Change Logs
   
   For files that are not created by Hudi but added to the table (zero copy bootstrap or OneTable case) we are unable to remove the column stats after these files are removed from the table view.
   
   ### Impact
   
   Allows proper cleanup of metadata table's stats partition
   
   ### Risk level (write none, low medium or high below)
   
   None
   
   ### Documentation Update
   
   _Describe any necessary documentation update if there is any new feature, config, or user-facing change_
   
   - _The config description must be updated if new configs are added or the default value of the configs are changed_
   - _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
     ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make
     changes to the website._
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Allow removal of column stats from metadata table for externally created files [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #10238:
URL: https://github.com/apache/hudi/pull/10238#issuecomment-1839112667

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fce0e1eb204f4377fb9f307168b43017d3acf73d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=21291",
       "triggerID" : "fce0e1eb204f4377fb9f307168b43017d3acf73d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fce0e1eb204f4377fb9f307168b43017d3acf73d Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=21291) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Allow removal of column stats from metadata table for externally created files [hudi]

Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan merged PR #10238:
URL: https://github.com/apache/hudi/pull/10238


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Allow removal of column stats from metadata table for externally created files [hudi]

Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on code in PR #10238:
URL: https://github.com/apache/hudi/pull/10238#discussion_r1465848613


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -652,7 +653,7 @@ public static HoodieData<HoodieRecord> convertMetadataToColumnStatsRecords(Hoodi
           String partitionPath = deleteFileInfoPair.getLeft();
           String filePath = deleteFileInfoPair.getRight();
 
-          if (filePath.endsWith(HoodieFileFormat.PARQUET.getFileExtension())) {
+          if (filePath.endsWith(HoodieFileFormat.PARQUET.getFileExtension()) || ExternalFilePathUtil.isExternallyCreatedFile(filePath)) {

Review Comment:
   I guess there is some gap here wrt log files. 
   for log files, we get stats directly from Append Handle and entries are added to col stats using log file name. 
   so, during clean commit metadata, we should be deleting both data files and log files. 
   
   https://issues.apache.org/jira/browse/HUDI-7331
   
   I have created a follow up ticket on this. lets fix it thoroughly. 



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Allow removal of column stats from metadata table for externally created files [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #10238:
URL: https://github.com/apache/hudi/pull/10238#issuecomment-1839098202

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fce0e1eb204f4377fb9f307168b43017d3acf73d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fce0e1eb204f4377fb9f307168b43017d3acf73d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fce0e1eb204f4377fb9f307168b43017d3acf73d UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Allow removal of column stats from metadata table for externally created files [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #10238:
URL: https://github.com/apache/hudi/pull/10238#issuecomment-1839467433

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fce0e1eb204f4377fb9f307168b43017d3acf73d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=21291",
       "triggerID" : "fce0e1eb204f4377fb9f307168b43017d3acf73d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fce0e1eb204f4377fb9f307168b43017d3acf73d Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=21291) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Allow removal of column stats from metadata table for externally created files [hudi]

Posted by "the-other-tim-brown (via GitHub)" <gi...@apache.org>.
the-other-tim-brown commented on code in PR #10238:
URL: https://github.com/apache/hudi/pull/10238#discussion_r1437357185


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -652,7 +653,7 @@ public static HoodieData<HoodieRecord> convertMetadataToColumnStatsRecords(Hoodi
           String partitionPath = deleteFileInfoPair.getLeft();
           String filePath = deleteFileInfoPair.getRight();
 
-          if (filePath.endsWith(HoodieFileFormat.PARQUET.getFileExtension())) {
+          if (filePath.endsWith(HoodieFileFormat.PARQUET.getFileExtension()) || ExternalFilePathUtil.isExternallyCreatedFile(filePath)) {

Review Comment:
   @nsivabalan can we just remove this check?



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org