[
https://issues.apache.org/jira/browse/TOREE-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15961445#comment-15961445
]
ASF GitHub Bot commented on TOREE-403:
--------------------------------------
Github user jodersky commented on a diff in the pull request:
https://github.com/apache/incubator-toree/pull/119#discussion_r110483001
--- Diff: kernel-api/src/main/scala/org/apache/toree/utils/FileUtils.scala
---
@@ -0,0 +1,61 @@
+/*
--- End diff --
This file has some styling issues
> Temporary files/directories should be deleted after a kernel shutdown
> ---------------------------------------------------------------------
>
> Key: TOREE-403
> URL: https://issues.apache.org/jira/browse/TOREE-403
> Project: TOREE
> Issue Type: Improvement
> Components: Kernel
> Affects Versions: 0.2.0
> Reporter: Kun Liu
>
> For Scala kernel, there are 3 types of temporary folders that created, by
> default under /tmp/ dir, that won't be deleted automatically.
> 1) toree-dependency-downloads-<RANDOM ID>
> Created right after a new Scala kernel is opened/initialized
> 2) toree_add_deps<RANDOM ID>
> Right after a Scala kernel is opened/initialized, saves JARs by addDeps magic
> Note this will be created even before the addDeps is called the first time
> This implies the num of 1) and 2) dirs are equal
>
> 3) toree_add_jars<RANDOM ID>
> After addJar magic is called, the JAR file would be downloaded to this
> temporary dir
> Besides, for 2) and 3), temp dirs will be created IFF the "deps_dir" and
> "jar_dir" parameters are not set on Config
> These temporary directories are not cleaned up after kernel is shutdown.
> Should delete them whenever a kernel is shutdown or killed.
> Also, I would recommend 1) putting all temp files/dirs into one to temp dir,
> so for each kernel, instead of having 3 temp dirs, there would be only 1,
> e.g.:
> /tmp/toree-<RANDOM ID>/
> /tmp/toree-<RANDOM ID>/toree_add_deps/
> /tmp/toree-<RANDOM ID>/toree-dependency-downloads/
> /tmp/toree-<RANDOM ID>/toree_add_jars/
> and 2) create a utility class to handle the temp dir creation and deletion
> tasks.
> Thanks Jacob for providing those two ideas.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)