Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
3.1.2
Description
I noticed a little problem when I was studying spark source code.
The following is an excerpt from the comments of the class: org.apache.spark.util.Utils and method: createDirectory
//This sporadically fails - not sure why ...
Not sure why? I'm sure it's improper.
Although File#mkdirs can create files, they are very unfriendly in exception handling.
Files#createDirectories in JDK7 is better.
Most importantly, in order to ensure correctness, I also added several targeted test cases.