nsivabalan opened a new pull request, #12291:
URL: https://github.com/apache/hudi/pull/12291

   ### Change Logs
   
   Fixing SI MDT record generation in MDT to not rely on RDD<WriteStatus> 
   This is a stacked patch over https://github.com/apache/hudi/pull/12269 
   
   This is the 2nd patch among series of patch. 
   In this patch, we are making SI to not rely on RDD<WriteStatus>. 
   SI needs to know what record keys have been deleted or updated so that it 
can delete those entries from SI. We are only adjusting this to not depend on 
the writeStatus. 
   
   We had to make some changes to our RLI and SI records are generated. 
   We do not want to read from data files repeatedly. And so, here is what we 
are doing. 
   
   Step1: For every HoodieWriteStat in the HoodieCommitMetadata, we are 
generating PerFileGroupRecordKeyInfos which contains 
    - a boolean flag to denote whether the file group of interest contains pure 
inserts. 
    - and List <RecordKeyInfo>. RecordKeyInfo is a POJO containing record key, 
RecordStatus, partition and fileID. 
        RecordStatus can be one of INSERT/UPDATE/DELETE. 
   
   Incase of parquet file: 
   - if previous base file is present, we read both old and new and generate 
this. 
   Incase of log files: 
   - If only RLI is enabled, we do some optimizations here as we don't really 
need to differentiate insert/updates in latest parquet file. 
   - Incase of delete blocks, we read them and and populate values for List 
<RecordKeyInfo>. 
   
   Step2: 
   Persist the output from Step1. (PairRDD)
   
   Step 3:
   - We use the output from Step2 and generate RLI records. 
   
   Step4: 
   - We use the output from Step 2 and generate SI records. Here we only poll 
the PerFileGroupRecordKeyInfos to understand the record keys that have been 
deleted or updated. 
   - We still have code snippets here to read directly from data files. This 
might be taking up in a separate patch. 
   
   
   
   ### Impact
   
   _Describe any public API or user-facing feature change or any performance 
impact._
   
   ### Risk level (write none, low medium or high below)
   
   _If medium or high, explain what verification was done to mitigate the 
risks._
   
   ### Documentation Update
   
   _Describe any necessary documentation update if there is any new feature, 
config, or user-facing change. If not, put "none"._
   
   - _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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to