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

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

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


   https://issues.apache.org/jira/projects/HUDI/issues/HUDI-2194
   
   ## *Tips*
   - *Thank you very much for contributing to Apache Hudi.*
   - *Please review https://hudi.apache.org/contributing.html before opening a 
pull request.*
   
   ## What is the purpose of the pull request
   As we known, SparkRecentDaysClusteringPlanStrategy is the default clustering 
strategy to create ClusteringPlan. And it is useful when Hudi table is 
partitioned by time.
    
   For now, users can set 
`hoodie.clustering.plan.strategy.daybased.lookback.partitions` to  control the 
number of partitions to list from the latest partition to create ClusteringPlan.
   
   For example, we have 6 partitions based on date, and users set 
`hoodie.clustering.plan.strategy.daybased.lookback.partitions` 2
   
   
![image](https://user-images.githubusercontent.com/69956021/126144048-d1b3c468-235b-4d65-baf5-9c5e6d15db22.png)
   
   Hudi will do cluster with partition 20210722 and partition 20210723
   
   Sometimes users also what to skip N partitions from latest when make 
clustering plan because latest partitions contains lots of update data or some 
reasons else.
    
   This patch will add a new config named `
   hoodie.clustering.plan.strategy.daybased.skipfromlatest.partitions
   ` to control the 
   number of partitions to skip from latest when choosing partitions to create 
ClusteringPlan
    
   For example users set 
`hoodie.clustering.plan.strategy.daybased.lookback.partitions` 2 and 
   `
   hoodie.clustering.plan.strategy.daybased.skipfromlatest.partitions
   ` 2
   
   
![image](https://user-images.githubusercontent.com/69956021/126144273-d8648ea7-98e3-43c5-9f70-be367025db4f.png)
   
   Hudi will do cluster with partition 20210720 and partition 20210721 which 
skipped 2 latest partitions.
   
   Also the default value is 0 which means skip nothing.
   
   ## Brief change log
   
   *(for example:)*
     - *Modify AnnotationLocation checkstyle rule in checkstyle.xml*
   
   ## 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: [email protected]

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


> Skip the latest N partitions when creating ClusteringPlan
> ---------------------------------------------------------
>
>                 Key: HUDI-2194
>                 URL: https://issues.apache.org/jira/browse/HUDI-2194
>             Project: Apache Hudi
>          Issue Type: Task
>            Reporter: Yue Zhang
>            Priority: Major
>
> As we known, SparkRecentDaysClusteringPlanStrategy is the default clustering 
> strategy to create ClusteringPlan. And it is useful when Hudi table is 
> partitioned by time.
>  
> For now, users can set 
> `hoodie.clustering.plan.strategy.daybased.lookback.partitions` to  control 
> the number of partitions to list from the latest partition to create 
> ClusteringPlan.
> For example, we have 6 partitions based on date, and users set 
> `hoodie.clustering.plan.strategy.daybased.lookback.partitions` 2
> |20210718|20210719 |20210720 |20210721 |20210722 |20210723(latest)|
>                                                                               
>   |<----- choose to cluster ---->|
> Sometimes users also what to skip x partitions from latest when make 
> clustering plan because latest partitions contains lots of update data or 
> some reasons else.
>  
> This patch will add a new config named `
> hoodie.clustering.plan.strategy.daybased.skipfromlatest.partitions
> ` to set the 
> number of partitions to skip from latest when choosing partitions to create 
> ClusteringPlan
>  
> for example users set 
> `hoodie.clustering.plan.strategy.daybased.lookback.partitions` 2 and 
> `
> hoodie.clustering.plan.strategy.daybased.skipfromlatest.partitions
> ` 2
> |20210718|20210719 |20210720 |20210721 |20210722 |20210723(latest)|
>                                         |<-----  choose  ----->|
>  



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

Reply via email to