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

ASF GitHub Bot commented on HUDI-2144:
--------------------------------------

hudi-bot edited a comment on pull request #3240:
URL: https://github.com/apache/hudi/pull/3240#issuecomment-876152859


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "41f14526b2ec956b2e61c4db5e38b7a0916cb040",
       "status" : "DELETED",
       "url" : 
"https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=794";,
       "triggerID" : "41f14526b2ec956b2e61c4db5e38b7a0916cb040",
       "triggerType" : "PUSH"
     }, {
       "hash" : "383cceef7d83b85754587ad791e50c7131026b84",
       "status" : "DELETED",
       "url" : 
"https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=846";,
       "triggerID" : "383cceef7d83b85754587ad791e50c7131026b84",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d3e1434240a47525c21487fce172a5d50234a20",
       "status" : "SUCCESS",
       "url" : 
"https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=847";,
       "triggerID" : "9d3e1434240a47525c21487fce172a5d50234a20",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9d3e1434240a47525c21487fce172a5d50234a20 Azure: 
[SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=847)
 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@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-unsubscr...@hudi.apache.org

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


> Offline clustering(independent sparkJob) will cause insert action losing data
> -----------------------------------------------------------------------------
>
>                 Key: HUDI-2144
>                 URL: https://issues.apache.org/jira/browse/HUDI-2144
>             Project: Apache Hudi
>          Issue Type: Bug
>            Reporter: Yue Zhang
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2021-07-08-13-52-00-089.png
>
>
> For now we have two kinds of pipeline for Hudi using spark:
>  # Streaming insert data to specific partition
>  # Offline clustering spark 
> job(`org.apache.hudi.utilities.HoodieClusteringJob`) to optimize file size 
> pipeline 1 created
> But here is a bug we met that will lose data
> These steps can make the problem reproduce stably :
>  # Submit a spark job to Ingest data1 using insert mode.
>  # Schedule a clustering plan using 
> `org.apache.hudi.utilities.HoodieClusteringJob`
>  # Submit a spark job again to Ingest data2 using insert mode(Ensure that 
> there is new file slice created in the same file group which means small file 
> tuning for insert is working). Suppose this file group is called file group 1 
> and new file slice is called file slice 2.
>  # Execute that clustering job step2 planed.
>  # Query data1+data2 you will find new data for a  is lost compared with 
> common ingestion without clustering
>  
>   !image-2021-07-08-13-52-00-089.png|width=922,height=728!
> Here is the root cause:
> When ingest data using insert mode, Hudi will find small files and try to 
> append new data to them ,aiming to tuning data file size.
> [https://github.com/apache/hudi/blob/650c4455c600b0346fed8b5b6aa4cc0bf3452e8c/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/UpsertPartitioner.java#L149]
> is try to filter Small Files In Clustering but only works when user set 
> `hoodie.clustering.inline` true which is not good enough when users using 
> offline clustering.
> I just raise a PR try to fix it and tested.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to