You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@toree.apache.org by "Jakob Odersky (JIRA)" <ji...@apache.org> on 2017/04/10 21:12:42 UTC

[jira] [Resolved] (TOREE-403) Temporary files/directories should be deleted after a kernel shutdown

     [ https://issues.apache.org/jira/browse/TOREE-403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Odersky resolved TOREE-403.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 0.2.0

> 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
>             Fix For: 0.2.0
>
>
> 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)