You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@toree.apache.org by "Kun Liu (JIRA)" <ji...@apache.org> on 2017/04/05 16:29:41 UTC

[jira] [Updated] (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 ]

Kun Liu updated TOREE-403:
--------------------------
    Description: 
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_add_deps<RANDOM ID>
Right after a Scala kernel is opened, saves JARs by addDeps magic
Note this will be created even before the addDeps is called the first time
 
2) toree-dependency-downloads-<RANDOM ID>
Also created right after a new Scala kernel is opened
This implies the num of 1) and 2) dirs are equal
(BTW, why this folder is needed? As it is always empty in my case)
 
3) toree_add_jars<RANDOM ID>
After addJar magic is called, the JAR file would be downloaded to this temporary dir

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.



  was:
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_add_deps<RANDOM ID>
Right after a Scala kernel is opened, saves JARs by addDeps magic
Note this will be created even before the addDeps is called the first time
 
2) toree-dependency-downloads-<RANDOM ID>
Also created right after a new Scala kernel is opened
This implies the num of 1) and 2) dirs are equal
(BTW, why this folder is needed? As it is always empty in my case)
 
3) toree_add_jars<RANDOM ID>
After addJar magic is called, the JAR file would be downloaded to this temporary dir

Should delete them whenever a kernel is shutdown or killed.


> 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_add_deps<RANDOM ID>
> Right after a Scala kernel is opened, saves JARs by addDeps magic
> Note this will be created even before the addDeps is called the first time
>  
> 2) toree-dependency-downloads-<RANDOM ID>
> Also created right after a new Scala kernel is opened
> This implies the num of 1) and 2) dirs are equal
> (BTW, why this folder is needed? As it is always empty in my case)
>  
> 3) toree_add_jars<RANDOM ID>
> After addJar magic is called, the JAR file would be downloaded to this temporary dir
> 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)