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

[SPARK-48595][CORE] Cleanup deprecated api usage related to commons-compress #46950

Closed
wants to merge 1 commit into from

Conversation

LuciferYang
Copy link
Contributor

@LuciferYang LuciferYang commented Jun 12, 2024

What changes were proposed in this pull request?

This pr use org.apache.commons.io.output.CountingOutputStream instead of org.apache.commons.compress.utils.CountingOutputStream to fix the following compilation warnings related to 'commons-compress':

[WARNING] [Warn] /Users/yangjie01/SourceCode/git/spark-mine-13/core/src/main/scala/org/apache/spark/deploy/history/EventLogFileWriters.scala:308: class CountingOutputStream in package utils is deprecated
Applicable -Wconf / @nowarn filters for this warning: msg=<part of the message>, cat=deprecation, site=org.apache.spark.deploy.history.RollingEventLogFilesWriter.countingOutputStream, origin=org.apache.commons.compress.utils.CountingOutputStream
[WARNING] [Warn] /Users/yangjie01/SourceCode/git/spark-mine-13/core/src/main/scala/org/apache/spark/deploy/history/EventLogFileWriters.scala:351: class CountingOutputStream in package utils is deprecated
Applicable -Wconf / @nowarn filters for this warning: msg=<part of the message>, cat=deprecation, site=org.apache.spark.deploy.history.RollingEventLogFilesWriter.rollEventLogFile.$anonfun, origin=org.apache.commons.compress.utils.CountingOutputStream

The fix refers to:

https://github.com/apache/commons-compress/blob/95727006cac0892c654951c4e7f1db142462f22a/src/main/java/org/apache/commons/compress/utils/CountingOutputStream.java#L25-L33

/**
 * Stream that tracks the number of bytes read.
 *
 * @since 1.3
 * @NotThreadSafe
 * @deprecated Use {@link org.apache.commons.io.output.CountingOutputStream}.
 */
@Deprecated
public class CountingOutputStream extends FilterOutputStream {

Why are the changes needed?

Cleanup deprecated api usage related to commons-compress

Does this PR introduce any user-facing change?

No

How was this patch tested?

Pass GitHub Actions

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the CORE label Jun 12, 2024
@LuciferYang LuciferYang marked this pull request as draft June 12, 2024 05:22
@LuciferYang
Copy link
Contributor Author

Test first

@LuciferYang LuciferYang marked this pull request as ready for review June 12, 2024 08:07
@yaooqinn yaooqinn closed this in a3625a9 Jun 12, 2024
@yaooqinn
Copy link
Member

Merged to master. Thank you @LuciferYang

@LuciferYang
Copy link
Contributor Author

Thanks @yaooqinn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants