I have two spark apps writing data to one directory. I notice they share one temp directory, and the spark fist finish writing will clear the temp directory and the slower one may throw "No lease on *** File does not exist" error
So how to specify the temp directory? 

Junfeng Chen