zhangyue19921010 opened a new pull request #3666:
URL: https://github.com/apache/hudi/pull/3666


   https://issues.apache.org/jira/projects/HUDI/issues/HUDI-2435
   
   ## What is the purpose of the pull request
   
   Before clustering job/ async clustering finished, hudi will perform errors 
check using `JavaRDD<WriteStatus> writeResponse`
   
   
https://github.com/apache/hudi/blob/dde57b293cd22ef1bd89f44054f109a52fc20e56/hudi-utilities/src/main/java/org/apache/hudi/utilities/HoodieClusteringJob.java#L194
   
   
https://github.com/apache/hudi/blob/1196736185272afaeda37328f1c52ccd5c6dc017/hudi-utilities/src/main/java/org/apache/hudi/utilities/UtilHelpers.java#L299
   
   `collect` is a spark action, when executor is crashed by accident and the 
cache of `JavaRDD<WriteStatus>` is lost, so that this collect action will 
trigger a complete compute and create unexpected marker files or data files.
   
   We should use `Option<HoodieCommitMetadata> commitMetadata` to do handle 
errors work instead.
   <img width="1665" alt="屏幕快照 2021-09-14 下午9 38 45" 
src="https://user-images.githubusercontent.com/69956021/133395021-61a17d4e-51c0-40b1-9867-45907ee312ff.png";>
   
   
   ## Verify this pull request
   
   *(Please pick either of the following options)*
   
   This pull request is a trivial rework / code cleanup without any test 
coverage.
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please 
describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   *(example:)*
   
     - *Added integration tests for end-to-end.*
     - *Added HoodieClientWriteTest to verify the change.*
     - *Manually verified the change by running a job locally.*
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under 
an umbrella JIRA.
   


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


Reply via email to