[SPARK-37853][CORE] Clean up deprecation compilation warning related to log4j2#35153
Closed
LuciferYang wants to merge 5 commits intoapache:masterfrom
Closed
[SPARK-37853][CORE] Clean up deprecation compilation warning related to log4j2#35153LuciferYang wants to merge 5 commits intoapache:masterfrom
LuciferYang wants to merge 5 commits intoapache:masterfrom
Conversation
gengliangwang
approved these changes
Jan 10, 2022
srowen
approved these changes
Jan 10, 2022
Member
|
cc @viirya |
viirya
approved these changes
Jan 10, 2022
| val fa = Log4jFileAppender.createAppender(localLogFile, "false", "false", | ||
| DriverLogger.APPENDER_NAME, "true", "false", "false", "4000", layout, null, | ||
| "false", null, config); | ||
| def log4jFileAppender() = { |
Contributor
Author
There was a problem hiding this comment.
Thanks for your correction
dongjoon-hyun
approved these changes
Jan 10, 2022
Member
dongjoon-hyun
left a comment
There was a problem hiding this comment.
+1, LGTM. Merged to master for Apache Spark 3.3.
dchvn
pushed a commit
to dchvn/spark
that referenced
this pull request
Jan 19, 2022
…to log4j2 ### What changes were proposed in this pull request? The are 2 deprecation compilation warning related to log4j2: ``` [WARNING] [Warn] /spark-source/core/src/main/scala/org/apache/spark/util/logging/DriverLogger.scala:64: [deprecation org.apache.spark.util.logging.DriverLogger.addLogAppender.fa | origin=org.apache.logging.log4j.core.appender.FileAppender.createAppender | version=] method createAppender in class FileAppender is deprecated [WARNING] [Warn] /spark-source/core/src/test/scala/org/apache/spark/SparkFunSuite.scala:268: [deprecation org.apache.spark.SparkFunSuite.LogAppender.<init> | origin=org.apache.logging.log4j.core.appender.AbstractAppender.<init> | version=] constructor AbstractAppender in class AbstractAppender is deprecated ``` In order to fix the above compilation warning, the main change of this pr as follows: 1. `Log4jFileAppender.Builder` is used instead of `Log4jFileAppender.createAppender` to fix compilation warning of `DriverLogger`, and the configuration of some default values is omitted refer to SPARK-6305. The initial status of `Log4jFileAppender.Builder` as follows: ```java fileName = null append = true locking = false advertise = false advertiseUri = null createOnDemand = false filePermissions = null fileOwner = null fileGroup = null bufferedIo = true bufferSize = 8192 immediateFlush = true ignoreExceptions = true layout = null name = null configuration = null filter = null propertyArray = null ``` And we can't use the chained API invocation mode because `AbstractFilterable.Builder.asBuilder()` method will return `Any` in Scala. 2. Use the recommended constructor of `AbstractAppender` refer to javadoc to fix compilation warning in `SparkFunSuite`. ### Why are the changes needed? Clean up deprecation compilation warning related to log4j2 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass GA Closes apache#35153 from LuciferYang/SPARK-37853. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
kazuyukitanimura
pushed a commit
to kazuyukitanimura/spark
that referenced
this pull request
Aug 10, 2022
…to log4j2 The are 2 deprecation compilation warning related to log4j2: ``` [WARNING] [Warn] /spark-source/core/src/main/scala/org/apache/spark/util/logging/DriverLogger.scala:64: [deprecation org.apache.spark.util.logging.DriverLogger.addLogAppender.fa | origin=org.apache.logging.log4j.core.appender.FileAppender.createAppender | version=] method createAppender in class FileAppender is deprecated [WARNING] [Warn] /spark-source/core/src/test/scala/org/apache/spark/SparkFunSuite.scala:268: [deprecation org.apache.spark.SparkFunSuite.LogAppender.<init> | origin=org.apache.logging.log4j.core.appender.AbstractAppender.<init> | version=] constructor AbstractAppender in class AbstractAppender is deprecated ``` In order to fix the above compilation warning, the main change of this pr as follows: 1. `Log4jFileAppender.Builder` is used instead of `Log4jFileAppender.createAppender` to fix compilation warning of `DriverLogger`, and the configuration of some default values is omitted refer to SPARK-6305. The initial status of `Log4jFileAppender.Builder` as follows: ```java fileName = null append = true locking = false advertise = false advertiseUri = null createOnDemand = false filePermissions = null fileOwner = null fileGroup = null bufferedIo = true bufferSize = 8192 immediateFlush = true ignoreExceptions = true layout = null name = null configuration = null filter = null propertyArray = null ``` And we can't use the chained API invocation mode because `AbstractFilterable.Builder.asBuilder()` method will return `Any` in Scala. 2. Use the recommended constructor of `AbstractAppender` refer to javadoc to fix compilation warning in `SparkFunSuite`. Clean up deprecation compilation warning related to log4j2 No Pass GA Closes apache#35153 from LuciferYang/SPARK-37853. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
asiunov
pushed a commit
to ascend-io/spark
that referenced
this pull request
Aug 25, 2022
…to log4j2 ### What changes were proposed in this pull request? The are 2 deprecation compilation warning related to log4j2: ``` [WARNING] [Warn] /spark-source/core/src/main/scala/org/apache/spark/util/logging/DriverLogger.scala:64: [deprecation org.apache.spark.util.logging.DriverLogger.addLogAppender.fa | origin=org.apache.logging.log4j.core.appender.FileAppender.createAppender | version=] method createAppender in class FileAppender is deprecated [WARNING] [Warn] /spark-source/core/src/test/scala/org/apache/spark/SparkFunSuite.scala:268: [deprecation org.apache.spark.SparkFunSuite.LogAppender.<init> | origin=org.apache.logging.log4j.core.appender.AbstractAppender.<init> | version=] constructor AbstractAppender in class AbstractAppender is deprecated ``` In order to fix the above compilation warning, the main change of this pr as follows: 1. `Log4jFileAppender.Builder` is used instead of `Log4jFileAppender.createAppender` to fix compilation warning of `DriverLogger`, and the configuration of some default values is omitted refer to SPARK-6305. The initial status of `Log4jFileAppender.Builder` as follows: ```java fileName = null append = true locking = false advertise = false advertiseUri = null createOnDemand = false filePermissions = null fileOwner = null fileGroup = null bufferedIo = true bufferSize = 8192 immediateFlush = true ignoreExceptions = true layout = null name = null configuration = null filter = null propertyArray = null ``` And we can't use the chained API invocation mode because `AbstractFilterable.Builder.asBuilder()` method will return `Any` in Scala. 2. Use the recommended constructor of `AbstractAppender` refer to javadoc to fix compilation warning in `SparkFunSuite`. ### Why are the changes needed? Clean up deprecation compilation warning related to log4j2 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass GA Closes apache#35153 from LuciferYang/SPARK-37853. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 9c12c37)
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.
What changes were proposed in this pull request?
The are 2 deprecation compilation warning related to log4j2:
In order to fix the above compilation warning, the main change of this pr as follows:
Log4jFileAppender.Builderis used instead ofLog4jFileAppender.createAppenderto fix compilation warning ofDriverLogger, and the configuration of some default values is omitted refer to SPARK-6305.The initial status of
Log4jFileAppender.Builderas follows:And we can't use the chained API invocation mode because
AbstractFilterable.Builder.asBuilder()method will returnAnyin Scala.AbstractAppenderrefer to javadoc to fix compilation warning inSparkFunSuite.Why are the changes needed?
Clean up deprecation compilation warning related to log4j2
Does this PR introduce any user-facing change?
No
How was this patch tested?
Pass GA