dongjoon-hyun commented on a change in pull request #24739:
[SPARK-27875][CORE][SQL][ML][K8S] Wrap all PrintWriter with
Utils.tryWithResource
URL: https://github.com/apache/spark/pull/24739#discussion_r288845743
##########
File path: core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala
##########
@@ -802,10 +802,10 @@ class SparkSubmitSuite
val f4 = File.createTempFile("test-submit-remote-python-files", "",
tmpDir)
val pyFile1 = File.createTempFile("file1", ".py", tmpDir)
val pyFile2 = File.createTempFile("file2", ".py", tmpDir)
- val writer4 = new PrintWriter(f4)
val remotePyFiles =
s"s3a://${pyFile1.getAbsolutePath},s3a://${pyFile2.getAbsolutePath}"
- writer4.println("spark.submit.pyFiles " + remotePyFiles)
- writer4.close()
+ Utils.tryWithResource(new PrintWriter(f4)) { writer4 =>
Review comment:
`writer4` -> `writer`.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]