-
Notifications
You must be signed in to change notification settings - Fork 13.9k
[FLINK-12181][Tests] Port ExecutionGraphRestartTest to new codebase #8226
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
Conversation
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
|
Thanks for opening this PR @leesf. Could you please rebase against the current master to resolve the merge conflicts? |
|
@tillrohrmann Rebased. |
azagrebin
left a comment
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 for opening the PR @leesf !
I have left some review comments.
| new SimpleAckingTaskManagerGateway(), | ||
| NUM_TASKS); | ||
| private ExecutionGraph createExecutionGraph(RestartStrategy restartStrategy, SlotPool slotPool) throws Exception { | ||
| setupSlotPool(slotPool, resourceManagerGateway, mainThreadExecutor); |
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.
The beginning of createExecutionGraph looks like the same as just calling createSchedulerWithSlots(NUM_TASKS, taskManagerGateway, slotPool).
| this.jobId = new JobID(); | ||
|
|
||
| taskManagerLocation = new LocalTaskManagerLocation(); | ||
| taskManagerGateway = new SimpleAckingTaskManagerGateway(); |
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.
Why do we need these variables created globally? They could be created and used only in private graph/scheduler creation methods after some code deduplication.
Also taskManagerGateway is created again locally in some tests: testLocalFailAndRestart, testRestartWithEagerSchedulingAndSlotSharing, testRestartWithSlotSharingAndNotEnoughResources which might not be needed.
| public void testFailWhileRestarting() throws Exception { | ||
| Scheduler scheduler = new Scheduler(TestingUtils.defaultExecutionContext()); | ||
| try (SlotPool slotPool = new SlotPoolImpl(jobId)) { | ||
| setupSlotPool(slotPool, resourceManagerGateway, mainThreadExecutor); |
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.
The beginning looks like just calling createExecutionGraph with custom JobGraph. If createExecutionGraph accepted JobGraph, this code could be deduplicated.
The same for other tests with similar code duplication.
|
@azagrebin Thanks for you review and sorry for lately reply. Updated the PR and address your comments, would you please review this pr in your free time? cc @tillrohrmann |
|
Thanks for addressing the comments @leesf ! |
|
@azagrebin Thanks for opening another PR, I will close this one. |
What is the purpose of the change
Port ExecutionGraphRestartTest to new codebase.
Brief change log
(for example:)
Verifying this change
This change is a trivial rework.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation