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.
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
HIVE-28417: Bump Log4j2 to 2.24.1 to facilitate compilation of GraalVM Native Image #5375
HIVE-28417: Bump Log4j2 to 2.24.1 to facilitate compilation of GraalVM Native Image #5375
Changes from all commits
b389aba
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 this changed?
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.
onMatch
andonMismatch
attributes in the properties configuration format logging-log4j2#2791, we no longer need such list definition, log4j2 will scan it automatically. Not surprisingly, retaining this attribute causes the warning.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.
https://web.archive.org/web/20240823014436/https://logging.apache.org/log4j/2.x/manual/configuration.html#configuration-syntax
Use of the packages attribute is deprecated and will be removed in Log4j 3.0. Plugins should be processed with the Log4j annotation processor. A comma separated list of package names to search for plugins. Plugins are only loaded once per classloader so changing this value may not have any effect upon reconfiguration.
How we replace
packages
with the new way? I think removingpackage
will cause some unkown issue.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.
packages
never worked in Hive. Unless Hive has always used log4j1 and never used log4j2. Because the classorg.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
exists in the JAR of the final binary of Hive,org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
generatesLog4j2Plugins.dat
, which directly covers the operation ofpackages
. It is located at/hive/ql/target/hive-exec-4.1.0-SNAPSHOT.jar!/META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat
.packages
is actually alog4j1
thing.onMatch
andonMismatch
attributes in the properties configuration format logging-log4j2#2791 (comment) .org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
is available since log4j2 2.0. The processor will generate the necessaryMETA-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat
descriptor that replaces classpath scanning. See After modularization of Log4j2, loading the plugin (PluginManager. addPackage) fails logging-log4j2#2434 (comment) . There is also an intuitive PR at Removes the deprecatedpackages
Log4j configuration attribute jmeter#6326 .Since Hive has neither CI for JDK23 and JDK24 nor CI for GraalVM Native Image, we actually don't need to register a
org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
inpom.xml
as https://logging.apache.org/log4j/2.x/manual/plugins.html#plugin-registry .-proc
isfull
. The JVM parameter-proc
did not becomeonly
until JDK23.-proc
offull
means that all processors are included by default. See Support compiling and using ShardingSphere under OpenJDK 23 shardingsphere#33025 and OpenJDK Committer’s Blog https://inside.java/2024/06/18/quality-heads-up/ . I also suspect that the ASF Jenkins node has an outdated JDK8 version and does not actually recognize the-proc
JVM parameter, just like the Temurin JDK 8 on the Github Actions Runner also does not recognize the-proc
JVM parameter.packages = org.apache.hadoop.hive.ql.log
affect things likelogger.Operator.name = org.apache.hadoop.hive.ql.exec.Operator
? Apparently not. Most people usepackages
because they are actually using log4j1.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.
Good explanation!
BTW, if Hive wants to use JDK23 or JDK24, should we need to register the
PluginProcessor
?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.
-proc:full
for JDK23
to make JDK23
behave the same as JDK8.-proc:full
is only available on11.0.23
,17.0.11
, JDK21
-24
.-proc:full
is not available on any OpenJDK 8u,-proc:full
is only available on Oracle's closed source JDK8u411
.<maven.compiler.proc>full</maven.compiler.proc>
in a separate Maven Profile to make JDK23 behave the same as JDK 8. Refer to Support building Example module with OpenJDK 23 shardingsphere#33224 for the solution.<maven.compiler.proc>full</maven.compiler.proc>
is not useful for Hive, as I found that the master branch of Hive cannot be compiled with JDK22. This means that none of the unit tests will be affected.