You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@livy.apache.org by "gyogal (via GitHub)" <gi...@apache.org> on 2023/04/03 14:30:52 UTC

[GitHub] [incubator-livy] gyogal commented on a diff in pull request #397: [LIVY-763][SERVER] Fix File Descriptor leak from DirectoryStream

gyogal commented on code in PR #397:
URL: https://github.com/apache/incubator-livy/pull/397#discussion_r1156047595


##########
server/src/main/scala/org/apache/livy/server/interactive/InteractiveSession.scala:
##########
@@ -259,21 +256,27 @@ object InteractiveSession extends Logging {
           sys.env.get("SPARK_HOME") .map { case sparkHome =>
             val pyLibPath = Seq(sparkHome, "python", "lib").mkString(File.separator)
             val pyArchivesFile = new File(pyLibPath, "pyspark.zip")
-            val py4jFile = Try {
-              Files.newDirectoryStream(Paths.get(pyLibPath), "py4j-*-src.zip")
-                .iterator()
+            var py4jZip : DirectoryStream[java.nio.file.Path] = null;
+            var py4jFile : File = null;

Review Comment:
   Could you please remove the extra spaces from the above two lines as well (after the variable name)?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@livy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org