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-28193][runtime] Enable to identify whether a job vertex contains source/sink operators #20043

Closed

Conversation

zhuzhurk
Copy link
Contributor

@zhuzhurk zhuzhurk commented Jun 22, 2022

What is the purpose of the change

Speculative execution does not support sources/sinks in the first version. Therefore, it will not create speculation instances for vertices which contains source/sink operators.
Note that a job vertex with no input/output does not mean it is a true source/sink vertex:

  • Multi-input sources can have input
  • It's possible that the vertex with no output edge does not contain any sink operator
  • A new sink with topology can spread the sink logic into multiple job vertices connected with job edges.

In this pr, we introduce methods to check whether a job vertex contains source/sink operators.

Verifying this change

  • Added unit test StreamingJobGraphGeneratorSourceSinkTest

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, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot
Copy link
Collaborator

flinkbot commented Jun 22, 2022

CI report:

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

@zentol
Copy link
Contributor

zentol commented Jun 22, 2022

Could you not infer this from the size of inputs/results in the JobVertex?

@zhuzhurk
Copy link
Contributor Author

zhuzhurk commented Jun 22, 2022

Could you not infer this from the size of inputs/results in the JobVertex?

A job vertex with no input/output does not mean it is a true source/sink vertex.

  • Multi-input sources can have input
  • It's possible that the vertex with no output edge does not contain any sink operator
  • A new sink with topology can spread the sink logic into multiple job vertices connected with job edges.

This was mentioned in the JIRA description. I will add it to the PR description.

@zhuzhurk zhuzhurk force-pushed the FLINK-28193-identify-source-sink branch from 1ed1778 to 547f946 Compare June 24, 2022 03:42
Copy link
Contributor

@wanglijie95 wanglijie95 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 @zhuzhurk.
The changes look good to me. I only had one minor comment. Please take a look.

@zhuzhurk zhuzhurk force-pushed the FLINK-28193-identify-source-sink branch from 547f946 to 8011116 Compare June 24, 2022 07:58
@zhuzhurk
Copy link
Contributor Author

Thanks for the reviewing! @wanglijie95
Merging.

@zhuzhurk zhuzhurk closed this in cef491e Jun 24, 2022
huangxiaofeng10047 pushed a commit to huangxiaofeng10047/flink that referenced this pull request Jun 27, 2022
zhuyufeng0809 pushed a commit to zhuyufeng0809/flink that referenced this pull request Jul 1, 2022
zstraw pushed a commit to zstraw/flink that referenced this pull request Jul 4, 2022
ericccarlson pushed a commit to ericccarlson/flink that referenced this pull request Jul 11, 2022
liujiawinds pushed a commit to liujiawinds/flink that referenced this pull request Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants