GitHub user HyukjinKwon opened a pull request: https://github.com/apache/spark/pull/17768
[SPARK-20465][CORE] Throws a proper exception when any temp directory could not be got/created (rather than ArrayIndexOutOfBoundsException) ## What changes were proposed in this pull request? This PR proposes to throw an exception with better message rather than `ArrayIndexOutOfBoundsException` when temp directories could not be created. **Before** ``` ./bin/spark-shell --conf spark.local.dir=/NONEXISTENT_DIR_ONE,/NONEXISTENT_DIR_TWO ``` ``` Exception in thread "main" java.lang.ExceptionInInitializerError ... Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 ... ``` **After** ``` Exception in thread "main" java.lang.ExceptionInInitializerError ... Caused by: java.io.IOException: Failed to get a temp directory under [/NONEXISTENT_DIR_ONE,/NONEXISTENT_DIR_TWO]. ... ``` ## How was this patch tested? Unit tests in `LocalDirsSuite.scala`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/HyukjinKwon/spark throws-temp-dir-exception Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/17768.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #17768 ---- commit 4500c2f2d989bfc1e76e07cbd38a9acbd384d3d5 Author: hyukjinkwon <gurwls...@gmail.com> Date: 2017-04-26T04:52:33Z Throws a proper exception rather than ArrayIndexOutOfBoundsException when temp directories could not be got/created ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org