-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-34224][CORE][SQL][SS][DSTREAM][YARN][TEST][EXAMPLES] Ensure all resource opened by Source.fromXXX are closed
#31323
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
|
Test build #134445 has finished for PR 31323 at commit
|
core/src/test/scala/org/apache/spark/deploy/LogUrlsStandaloneSuite.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/org/apache/spark/deploy/master/MasterSuite.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/org/apache/spark/deploy/master/MasterSuite.scala
Outdated
Show resolved
Hide resolved
examples/src/main/scala/org/apache/spark/examples/DFSReadWriteTest.scala
Outdated
Show resolved
Hide resolved
...nal/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaSourceOffsetSuite.scala
Outdated
Show resolved
Hide resolved
|
Kubernetes integration test starting |
|
Kubernetes integration test starting |
Source.fromXXX are closedSource.fromXXX are closed
Source.fromXXX are closedSource.fromXXX are closed
|
Kubernetes integration test status failure |
|
Kubernetes integration test status failure |
|
Kubernetes integration test starting |
|
Test build #134447 has finished for PR 31323 at commit
|
|
Kubernetes integration test status failure |
|
Test build #134449 has finished for PR 31323 at commit
|
external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaTestUtils.scala
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/execution/QueryExecutionSuite.scala
Outdated
Show resolved
Hide resolved
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveExternalCatalogVersionsSuite.scala
Outdated
Show resolved
Hide resolved
core/src/test/scala/org/apache/spark/deploy/master/MasterSuite.scala
Outdated
Show resolved
Hide resolved
examples/src/main/scala/org/apache/spark/examples/DFSReadWriteTest.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/execution/QueryExecutionSuite.scala
Outdated
Show resolved
Hide resolved
|
LGTM otherwise |
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
sql/core/src/test/scala/org/apache/spark/sql/execution/QueryExecutionSuite.scala
Show resolved
Hide resolved
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveExternalCatalogVersionsSuite.scala
Show resolved
Hide resolved
|
Test build #134478 has finished for PR 31323 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #134483 has finished for PR 31323 at commit
|
…l resource opened by `Source.fromXXX` are closed ### What changes were proposed in this pull request? Using a function like `.mkString` or `.getLines` directly on a `scala.io.Source` opened by `fromFile`, `fromURL`, `fromURI ` will leak the underlying file handle, this pr use the `Utils.tryWithResource` method wrap the `BufferedSource` to ensure these `BufferedSource` closed. ### Why are the changes needed? Avoid file handle leak. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass the Jenkins or GitHub Action Closes #31323 from LuciferYang/source-not-closed. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: HyukjinKwon <gurwls223@apache.org> (cherry picked from commit 8999e88) Signed-off-by: HyukjinKwon <gurwls223@apache.org>
|
Merged to master and branch-3.1. @LuciferYang, do you mind opening a PR for branch-3.0 and branch-2.4 too? |
@LuciferYang, do you mind opening a PR for branch-3.0 and branch-2.4 too? OK, will do it later ~ |
…l resource opened by `Source.fromXXX` are closed Using a function like `.mkString` or `.getLines` directly on a `scala.io.Source` opened by `fromFile`, `fromURL`, `fromURI ` will leak the underlying file handle, this pr use the `Utils.tryWithResource` method wrap the `BufferedSource` to ensure these `BufferedSource` closed. Avoid file handle leak. No Pass the Jenkins or GitHub Action Closes apache#31323 from LuciferYang/source-not-closed. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: HyukjinKwon <gurwls223@apache.org>
…l resource opened by `Source.fromXXX` are closed Using a function like `.mkString` or `.getLines` directly on a `scala.io.Source` opened by `fromFile`, `fromURL`, `fromURI ` will leak the underlying file handle, this pr use the `Utils.tryWithResource` method wrap the `BufferedSource` to ensure these `BufferedSource` closed. Avoid file handle leak. No Pass the Jenkins or GitHub Action Closes apache#31323 from LuciferYang/source-not-closed. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: HyukjinKwon <gurwls223@apache.org>
|
Thank you, @LuciferYang and @HyukjinKwon and @jaceklaskowski ! |
…l resource opened by `Source.fromXXX` are closed ### What changes were proposed in this pull request? Using a function like `.mkString` or `.getLines` directly on a `scala.io.Source` opened by `fromFile`, `fromURL`, `fromURI ` will leak the underlying file handle, this pr use the `Utils.tryWithResource` method wrap the `BufferedSource` to ensure these `BufferedSource` closed. ### Why are the changes needed? Avoid file handle leak. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass the Jenkins or GitHub Action Closes apache#31323 from LuciferYang/source-not-closed. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: HyukjinKwon <gurwls223@apache.org>
What changes were proposed in this pull request?
Using a function like
.mkStringor.getLinesdirectly on ascala.io.Sourceopened byfromFile,fromURL,fromURIwill leak the underlying file handle, this pr use theUtils.tryWithResourcemethod wrap theBufferedSourceto ensure theseBufferedSourceclosed.Why are the changes needed?
Avoid file handle leak.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Pass the Jenkins or GitHub Action