Skip to content
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

[FLINK-21260] Add Finished state for DeclarativeScheduler #14912

Closed
wants to merge 2 commits into from

Conversation

rmetzger
Copy link
Contributor

@rmetzger rmetzger commented Feb 9, 2021

What is the purpose of the change

Declarative Scheduler consists of a number of internal states.

Note that this change is currently not usable as-is, as the other parts of declarative scheduler are not merged yet (See for the prototype this PR is based on: https://github.com/tillrohrmann/flink/tree/declarative-scheduler)

Verifying this change

  • The change is adding unit tests.
  • Note that integration tests for the declarative scheduler will cover additional functionality.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

Will be handled in a separate PR.

@flinkbot
Copy link
Collaborator

flinkbot commented Feb 9, 2021

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 0c9564d (Tue Feb 09 14:41:33 UTC 2021)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The 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 commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Feb 9, 2021

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for creating this PR @rmetzger. The changes look good to me. I had a comment concerning the tests. I think it would be a bit clearer if one sees the terminal state with which the ArchivedExecutionGraph is initialized.

Comment on lines +40 to +44
MockFinishedContext ctx = new MockFinishedContext();
Finished finished = createFinishedState(ctx);
finished.onEnter();

assertThat(ctx.getArchivedExecutionGraph().getState(), is(JobStatus.FAILED));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at this test, it is not very clear to me why the archived execution graph is FAILED. I assume that this hidden inside of createFinishedState, right?

Comment on lines +77 to +80
final ExecutionGraph executionGraph = TestingExecutionGraphBuilder.newBuilder().build();
executionGraph.failJob(new RuntimeException());
final ArchivedExecutionGraph archivedExecutionGraph =
ArchivedExecutionGraph.createFrom(executionGraph);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could directly use the ArchivedExecutionGraphBuilder. That way you don't have to make a detour creating an ExecutionGraph.

@rmetzger
Copy link
Contributor Author

Thank you for your feedback! I addressed the comments and will merge the change now!

@rmetzger rmetzger closed this in e2ff147 Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants