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

[GitHub] [incubator-livy] RajshekharMuchandi opened a new pull request, #397: [LIVY-763][SERVER] Fix File Descriptor leak from DirectoryStream

RajshekharMuchandi opened a new pull request, #397:
URL: https://github.com/apache/incubator-livy/pull/397

   ## What changes were proposed in this pull request?
   
   Took separate handle for directory stream. Closed directory stream handle in finally block. Code changes done in `InteractiveSession.scala`.
   
   JIRA: https://issues.apache.org/jira/browse/LIVY-763
   
   ## How was this patch tested?
   
   Ran `lsof | grep python` command to see the Directory FDs for `{SPARK_HOME}/python/lib`. Tested by creating interactive session for pyspark and verified FDs are not created.
   
   


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


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

Posted by "gyogal (via GitHub)" <gi...@apache.org>.
gyogal commented on PR #397:
URL: https://github.com/apache/incubator-livy/pull/397#issuecomment-1503225859

   Thank you for your contribution, @RajshekharMuchandi!


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


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

Posted by "gyogal (via GitHub)" <gi...@apache.org>.
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


[GitHub] [incubator-livy] gyogal merged pull request #397: [LIVY-763][SERVER] Fix File Descriptor leak from DirectoryStream

Posted by "gyogal (via GitHub)" <gi...@apache.org>.
gyogal merged PR #397:
URL: https://github.com/apache/incubator-livy/pull/397


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