-
Notifications
You must be signed in to change notification settings - Fork 498
[FLINK-37869][Observer] Fix finished bounded stream jobs can't be cle… #1003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @qinf for the PR.
I'm not sure if "Job %s not found" means the job is finished. Is it possible that the job failed?
Or could you please add some background in PR description to explain what the relationship is between
getLastCheckpointand clean job?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@1996fanrui Thanks for the quick feedback, I have added the background. I also add a example here.
For FINISHED job
6f4257aaf163d19a6fa1519479795c11:GET /jobs/:jobid->GET /jobs/6f4257aaf163d19a6fa1519479795c11, the response is:{ "jid": "6f4257aaf163d19a6fa1519479795c11", "name": "app442315instance1204699", "isStoppable": false, "state": "FINISHED", "start-time": 1754445330065, "end-time": 1754445366256, "duration": 36191, "maxParallelism": -1, "now": 1754445409626, "timestamps": { "CREATED": 1754445338012, "RUNNING": 1754445338616, "CANCELED": 0, "INITIALIZING": 1754445330065, "RECONCILING": 0, "FINISHED": 1754445366256, "FAILED": 0, "CANCELLING": 0, "FAILING": 0, "RESTARTING": 0, "SUSPENDED": 0 }, ...... }GET /jobs/:jobid/checkpoints->GET /jobs/6f4257aaf163d19a6fa1519479795c11/checkpoints, the response is:{ "errors": [ "org.apache.flink.runtime.rest.NotFoundException: Job 6f4257aaf163d19a6fa1519479795c11 not found\n\tat org.apache.flink.runtime.rest.handler.job.checkpoints.AbstractCheckpointStatsHandler.lambda$handleRequest$2(AbstractCheckpointStatsHandler.java:102)\n\tat java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:884)\n\tat java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:866)\n\tat ..." }Maybe the current solution catching the exception in
getLastCheckpoint()is somewhat unintuitive here. Another solution is catching the exceptionJob not foundinobserveLatestCheckpoint()And can check the job is FINISHED by
Do you have any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I did not see any change in PR description. Is there anything I missed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@1996fanrui Sorry for that, I re-submit the background.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When job is finished, the control loop will be stopped due to "Job not found" exception, it caused the clean up is not called, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@1996fanrui Yes, due to the "Job not found" exception, the flink cluster resouce remains in the cluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @qinf for the explanation!
It sounds good to me.