-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-48583][SQL][TESTS] Replace deprecated classes and methods of commons-io called in Spark
#46935
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
Conversation
|
Is this the only case related to commons-io? |
For |
|
Yes, if there are other cases related to commons-io, let's fix them together all in one |
|
@wayneguow seems there are other cases related to commons-io in |
@LuciferYang Thank you for pointing that out. I'll fix this and other left in a batch. |
FileUtils#writeStringToFile commons-io called in Spark
|
@LuciferYang I made a double check, the following
In the build log, only |
commons-io called in Sparkcommons-io called in Spark
commons-io called in Sparkcommons-io called in Spark
| countingIn = new CountingInputStream(fsin) | ||
| countingIn = BoundedInputStream.builder() | ||
| .setInputStream(fsin) | ||
| .setMaxCount(fileSplit.getLength) |
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.
Is this really necessary in the current scenario? Perhaps the unbound one is enough?
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.
Sounds good, changed to unbound .
|
Merged into master for Spark 4.0. Thanks @wayneguow |
What changes were proposed in this pull request?
This pr replaces deprecated classes and methods of
commons-iocalled in Spark:writeStringToFile(final File file, final String data)->writeStringToFile(final File file, final String data, final Charset charset)CountingInputStream->BoundedInputStreamWhy are the changes needed?
Clean up deprecated API usage.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Passed related test cases in
UDFXPathUtilSuiteandXmlSuite.Was this patch authored or co-authored using generative AI tooling?
No.