LuciferYang opened a new pull request #31389:
URL: https://github.com/apache/spark/pull/31389
### What changes were proposed in this pull request?
There are some deprecated API usage compilation warning related to Apache
commons-io as follows:
```
[WARNING] [Warn]
/spark/core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala:1109:
[deprecation @
org.apache.spark.deploy.SparkSubmitSuite.checkDownloadedFile.$org_scalatest_assert_macro_expr.$org_scalatest_assert_macro_left
| origin=org.apache.commons.io.FileUtils.readFileToString | version=] method
readFileToString in class FileUtils is deprecated
[WARNING] [Warn]
/spark/core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala:1110:
[deprecation @
org.apache.spark.deploy.SparkSubmitSuite.checkDownloadedFile.$org_scalatest_assert_macro_expr.$org_scalatest_assert_macro_right
| origin=org.apache.commons.io.FileUtils.readFileToString | version=] method
readFileToString in class FileUtils is deprecated
[WARNING] [Warn]
/spark/core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala:1152:
[deprecation @ org.apache.spark.deploy.SparkSubmitSuite |
origin=org.apache.commons.io.FileUtils.write | version=] method write in class
FileUtils is deprecated
[WARNING] [Warn]
/spark/core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala:1167:
[deprecation @ org.apache.spark.deploy.SparkSubmitSuite |
origin=org.apache.commons.io.FileUtils.write | version=] method write in class
FileUtils is deprecated
[WARNING] [Warn]
/spark/core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala:201:
[deprecation @ org.apache.spark.deploy.history.HistoryServerSuite.<local
HistoryServerSuite>.$anonfun.exp |
origin=org.apache.commons.io.IOUtils.toString | version=] method toString in
class IOUtils is deprecated
[WARNING] [Warn]
/spark/core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala:716:
[deprecation @
org.apache.spark.deploy.history.HistoryServerSuite.getContentAndCode.inString.$anonfun
| origin=org.apache.commons.io.IOUtils.toString | version=] method toString in
class IOUtils is deprecated
[WARNING] [Warn]
/spark/core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala:732:
[deprecation @
org.apache.spark.deploy.history.HistoryServerSuite.connectAndGetInputStream.errString.$anonfun
| origin=org.apache.commons.io.IOUtils.toString | version=] method toString in
class IOUtils is deprecated
[WARNING] [Warn]
/spark/streaming/src/test/scala/org/apache/spark/streaming/InputStreamsSuite.scala:267:
[deprecation @ org.apache.spark.streaming.InputStreamsSuite.<local
InputStreamsSuite>.$anonfun.$anonfun.write |
origin=org.apache.commons.io.IOUtils.write | version=] method write in class
IOUtils is deprecated
[WARNING] [Warn]
/spark/streaming/src/test/scala/org/apache/spark/streaming/StreamingContextSuite.scala:912:
[deprecation @
org.apache.spark.streaming.StreamingContextSuite.createCorruptedCheckpoint |
origin=org.apache.commons.io.FileUtils.write | version=] method write in class
FileUtils is deprecated
```
The main API change is to need to add a `java.nio.charset.Charset` parameter
when the corresponding method is called, so the main change of is pr is add a
`StandardCharsets.UTF_8` parameter to the these method.
### Why are the changes needed?
Fix deprecated API usage of Apache commons-io.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Pass the Jenkins or GitHub Action
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]