[dist][runtime] Use Flink-provided Log4j dependencies - #954
Open
rosemarYuan wants to merge 1 commit into
Open
Conversation
Contributor
|
Could you help review this pr @GreatEugenius? |
3 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Linked issue: #953
Purpose of change
The shaded Dist artifacts currently receive Log4j and SLF4J dependencies transitively from Plan, even though the default logging setup of the supported Flink distributions already provides Log4j2 and the SLF4J binding for JobManager and TaskManager processes.
This can place different Log4j API and Core versions on the same runtime classpath and cause linkage errors such as
NoSuchMethodError.This PR makes the logging dependency and packaging boundary explicit:
slf4j-apias a normal Plan dependency so standalone Plan tools remain usable, but removelog4j-coreandlog4j-slf4j-implfrom Plan.providedand align the compile-time Log4j version with 2.24.3, the version used by the oldest supported Flink distributions.log4j2.*configuration files from all shaded Dist artifacts.META-INF/NOTICEso it no longer lists Log4j or SLF4J as bundled dependencies.After this change, Flink Agents uses the Log4j2 implementation provided by the default logging setup of the selected supported Flink distribution and no longer packages a second logging stack.
Tests
log4j2.*configuration files.Full E2E and clean Flink deployment tests were not run locally.
API
No public API changes.
Documentation
doc-neededdoc-not-neededdoc-included