Standalone mode, move "work" directory or cleanup after job?

1,702 views
Skip to first unread message

Aki Matsukawa

unread,
Apr 29, 2013, 4:55:47 PM4/29/13
to spark...@googlegroups.com
Hi,

I am running Spark in standalone mode. I am creating a SparkContext with a jar to ship to all workers. This jar is fairly big (100MB) and I am observing that each time I run a job, this jar is getting shipped to each machine, under a new folder under $SPARK_HOME/work/<app_id>/. 

As you can imagine, running many jobs quickly causes disks on the worker machines to fill up. Is there a way to automatically delete these jars after the job is done, and/or move where the "work" directory is?

Thanks!

Matei Zaharia

unread,
Apr 29, 2013, 7:45:06 PM4/29/13
to spark...@googlegroups.com
You can move the location of the work directory by adding the following to your conf/spark-env.sh:

export SPARK_WORKER_DIR=/path/to/dir

Unfortunately, right now there's no automatic cleanup, but the directories are numbered in order of execution. You could create your own periodic cleanup script that deletes old ones.

Matei
> --
> You received this message because you are subscribed to the Google Groups "Spark Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to spark-users...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Dmitriy Lyubimov

unread,
Jun 24, 2013, 10:56:43 PM6/24/13
to spark...@googlegroups.com, brian...@agilone.com
is this still the case with 0.7.2? there's still no automatic cleanup?

Dmitriy Lyubimov

unread,
Jun 26, 2013, 8:31:25 PM6/26/13
to spark...@googlegroups.com
On Mon, Jun 24, 2013 at 7:56 PM, Dmitriy Lyubimov <dli...@gmail.com> wrote:
is this still the case with 0.7.2? there's still no automatic cleanup?

Nobody knows this??

Matei Zaharia

unread,
Jun 26, 2013, 11:32:48 PM6/26/13
to spark...@googlegroups.com
Yup, this is still the case in 0.7.2. Actually this might be a good feature to add in 0.7.3 -- thanks for bringing it up. Will definitely add it for 0.8.

Matei

Dmitriy Lyubimov

unread,
Jun 27, 2013, 1:36:03 AM6/27/13
to spark...@googlegroups.com

Thank you.

Reply all
Reply to author
Forward
0 new messages