Hoodie data update reject clustering using SparkRejectClusteringStrategy
- Dominant language
- Java
- Stars
- 6.2k
- Forks
- 2.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 111
Description
Hudi now support async clustering in HoodieDeltaStreamer and StructStreaming and support offline clustering through HoodieClusteringJob.
Data update conflicts with clustering is one of the more common scenarios. And now hudi can only reject data using SparkRejectUpdateStrategy and failed the ingestion.
Sometimes, we think that clustering is an optimization service that runs in the background, and data ingestion has a higher priority than it.
So this tickets add a new UpdateStrategy named SparkRejectClusteringStrategy.
This SparkRejectClusteringStrategy will reject and failing clustering job and let data update success.
When update happened after clustering plan created and before clustering executed.When update happened after clustering plan created and before clustering executed.
1. There will be a request replace commit.
2. SparkRejectClusteringStrategy will create a clustering reject file under .tmp dir named xxx.replacement.request.reject.
3. Before perform clustering job, hudi can check this reject file using SparkRejectClusteringStrategy.validateClustering() function.
3.1 if reject file is exists then abort this clustering plan and remove reject file.
When update happened after clustering executed but not finished.
1. There will be a inflight replace commit.
2. SparkRejectClusteringStrategy will create a clustering reject file under .tmp dir named xxx.replacement.inflight.reject.
3. Before clustering job finished and committed, hudi can check this reject file using SparkRejectClusteringStrategy.validateClustering() function.
3.1 if reject file is exists then failed this clustering execution and remove reject file.
## JIRA info
- Link: https://issues.apache.org/jira/browse/HUDI-2338
- Type: Task
---
## Comments
20/Aug/21 02:17;githubbot;zhangyue19921010 opened a new pull request #3509:
URL: https://github.com/apache/hudi/pull/3509
https://issues.apache.org/jira/browse/HUDI-2338
## What is the purpose of the pull request
Hudi now support async clustering in HoodieDeltaStreamer and StructStreaming and support offline clustering through HoodieClusteringJob.
Data update conflicts with clustering is one of the more common scenarios. And now hudi can only reject data using SparkRejectUpdateStrategy and failed the ingestion.
Sometimes, we think that clustering is an optimization service that runs in the background, and data ingestion has a higher priority than it.
So this tickets add a new UpdateStrategy named `SparkRejectClusteringStrategy`.
This SparkRejectClusteringStrategy will reject and failing clustering job and let data update success.
## Brief change log
When update happened after clustering plan created and before clustering executed.When update happened after clustering plan created and before clustering executed.
1. There will be a request replace commit.
2. SparkRejectClusteringStrategy will create a clustering reject file under .tmp dir named xxx.replacement.request.reject.
3. Before perform clustering job, hudi can check this reject file using SparkRejectClusteringStrategy.validateClustering() function.
3.1 if reject file is exists then abort this clustering plan and remove reject file.
When update happened after clustering executed but not finished.
1. There will be a inflight replace commit.
2. SparkRejectClusteringStrategy will create a clustering reject file under .tmp dir named xxx.replacement.inflight.reject.
3. Before clustering job finished and committed, hudi can check this reject file using SparkRejectClusteringStrategy.validateClustering() function.
3.1 if reject file is exists then failed this clustering execution and remove reject file.
This PR is already tested on our env and added UTs which are necessary.
As you can see, the update action in 20210820093028.commit can success and create a clustering reject file under .hoodie/.tmp dir
Also the clustering job in 20210820092927.replacecommit.requested if failed because of SparkRejectClusteringStrategy
## 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-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
;;;
---
20/Aug/21 02:20;githubbot;hudi-bot commented on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-902380160
## CI report:
* 2511b6a222b821a06925f8e82257779529193fbc UNKNOWN
Bot commands
@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
--
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
;;;
---
20/Aug/21 02:23;githubbot;hudi-bot edited a comment on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-902380160
## CI report:
* 2511b6a222b821a06925f8e82257779529193fbc Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1825)
Bot commands
@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
--
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
;;;
---
20/Aug/21 02:28;githubbot;hudi-bot edited a comment on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-902380160
## CI report:
* 2511b6a222b821a06925f8e82257779529193fbc Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1825)
* e1ddc232a3cf45c731293cb5947f11c7eb8122ce UNKNOWN
Bot commands
@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
--
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
;;;
---
20/Aug/21 02:31;githubbot;hudi-bot edited a comment on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-902380160
## CI report:
* 2511b6a222b821a06925f8e82257779529193fbc Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1825)
* e1ddc232a3cf45c731293cb5947f11c7eb8122ce UNKNOWN
Bot commands
@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
--
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
;;;
---
20/Aug/21 03:24;githubbot;hudi-bot edited a comment on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-902380160
## CI report:
* 2511b6a222b821a06925f8e82257779529193fbc Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1825)
* e1ddc232a3cf45c731293cb5947f11c7eb8122ce Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1828)
Bot commands
@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
--
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
;;;
---
20/Aug/21 04:18;githubbot;hudi-bot edited a comment on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-902380160
## CI report:
* e1ddc232a3cf45c731293cb5947f11c7eb8122ce Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1828)
Bot commands
@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
--
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
;;;
---
20/Aug/21 04:34;githubbot;hudi-bot edited a comment on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-902380160
## CI report:
* e1ddc232a3cf45c731293cb5947f11c7eb8122ce Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1828)
* bd9139b612fc2f6ec85e3ab8a0856eb6e21e269d UNKNOWN
Bot commands
@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
--
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
;;;
---
20/Aug/21 04:37;githubbot;hudi-bot edited a comment on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-902380160
## CI report:
* e1ddc232a3cf45c731293cb5947f11c7eb8122ce Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1828)
* bd9139b612fc2f6ec85e3ab8a0856eb6e21e269d Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1829)
Bot commands
@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
--
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
;;;
---
20/Aug/21 05:27;githubbot;hudi-bot edited a comment on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-902380160
## CI report:
* bd9139b612fc2f6ec85e3ab8a0856eb6e21e269d Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1829)
Bot commands
@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
--
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
;;;
---
20/Aug/21 05:41;githubbot;zhangyue19921010 commented on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-902446099
@hudi-bot run azure
--
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
;;;
---
20/Aug/21 05:43;githubbot;hudi-bot edited a comment on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-902380160
## CI report:
* bd9139b612fc2f6ec85e3ab8a0856eb6e21e269d Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1829) Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1831)
Bot commands
@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
--
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
;;;
---
20/Aug/21 06:40;githubbot;hudi-bot edited a comment on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-902380160
## CI report:
* bd9139b612fc2f6ec85e3ab8a0856eb6e21e269d Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1829) Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1831)
Bot commands
@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
--
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
;;;
---
07/Sep/21 23:01;githubbot;vinothchandar commented on pull request #3509:
URL: https://github.com/apache/hudi/pull/3509#issuecomment-914680371
@satishkotha if you are up for it, this is a good PR to get your feedback on
--
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
;;;
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the proposed SparkRejectClusteringStrategy and its validateClustering() entry point. Review pull request #3509 and the described request and inflight reject-file flows. Done means updates succeed while conflicting clustering is rejected, and the reject files are checked, removed, and reflected in the clustering outcome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spark
- Domain
- data-engineering, distributed-systems, stream-processing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100