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-29014][streaming-java][table] Improve end-to-end story about PipelinesOptions.JARS #20633

Merged
merged 5 commits into from Aug 23, 2022

Conversation

twalthr
Copy link
Contributor

@twalthr twalthr commented Aug 19, 2022

What is the purpose of the change

This PR improves the configuration story in various aspects. The main target is to remove inconsistencies but also a simple architecture under the hood.

Brief change log

StreamExecutionEnvironment.getConfiguration() was not only a ReadableConfig but also a deep copy. This caused various problems downstream (Python API) and makes accessing configuration expensive. Root configuration of TableConfig should not be a snapshot but a reference that always reflects the current status of StreamExecutionEnvironment. Otherwise, when merging e.g. PipelineOptions.JARS, it is possible that entries get lost when an outdated root configuration is used during merging.

StreamExecutionEnvironment.configure() should not contain merging logic. It should be a set operation as all other options as well.

Table API should apply JAR file paths to TableConfig only. There is logic to apply this to lower layers already.

The same logic should also apply for StreamTableEnvironment.

Also, PipelineOptions.JARS is not set by default if no jars have been added.

Verifying this change

This change added tests and can be verified as follows: DataStreamJavaITCase#testResourcePropagation

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

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

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? JavaDocs

@twalthr twalthr changed the title Flink 29014 2 [FLINK-29014][streaming-java][table] Improve end-to-end story about PipelinesOptions.JARS Aug 19, 2022
@twalthr
Copy link
Contributor Author

twalthr commented Aug 19, 2022

@lsyldliu could you help me with a review? Thanks :)

@flinkbot
Copy link
Collaborator

flinkbot commented Aug 19, 2022

CI report:

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

@lsyldliu
Copy link
Contributor

@lsyldliu could you help me with a review? Thanks :)

Ok, I will review it as soon as possible.

Copy link
Contributor

@zhuzhurk zhuzhurk left a comment

Choose a reason for hiding this comment

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

Nice work and I only have one minor comment.

…t.getConfiguration

StreamExecutionEnvironment.getConfiguration() was not only a ReadableConfig but also a
deep copy. This caused various problems downstream (Python API) and makes accessing
configuration expensive. Root configuration of TableConfig should not be a snapshot
but a reference that always reflects the current status of StreamExecutionEnvironment.
Otherwise, when merging e.g. PipelineOptions.JARS, it is possible that entries get
lost when an outdated root configuration is used during merging.
Copy link
Contributor

@zhuzhurk zhuzhurk left a comment

Choose a reason for hiding this comment

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

+1

@twalthr twalthr closed this in eb69b11 Aug 23, 2022
@twalthr twalthr merged commit eb69b11 into apache:master Aug 23, 2022
huangxiaofeng10047 pushed a commit to huangxiaofeng10047/flink that referenced this pull request Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants