spark-instrumented-optimizer/repl
Steve Loughran cc97ea188e [SPARK-16736][CORE][SQL] purge superfluous fs calls
A review of the code, working back from Hadoop's `FileSystem.exists()` and `FileSystem.isDirectory()` code, then removing uses of the calls when superfluous.

1. delete is harmless if called on a nonexistent path, so don't do any checks before deletes
1. any `FileSystem.exists()`  check before `getFileStatus()` or `open()` is superfluous as the operation itself does the check. Instead the `FileNotFoundException` is caught and triggers the downgraded path. When a `FileNotFoundException` was thrown before, the code still creates a new FNFE with the error messages. Though now the inner exceptions are nested, for easier diagnostics.

Initially, relying on Jenkins test runs.

One troublespot here is that some of the codepaths are clearly error situations; it's not clear that they have coverage anyway. Trying to create the failure conditions in tests would be ideal, but it will also be hard.

Author: Steve Loughran <stevel@apache.org>

Closes #14371 from steveloughran/cloud/SPARK-16736-superfluous-fs-calls.
2016-08-17 11:43:01 -07:00
..
scala-2.10/src [SPARK-16812] Open up SparkILoop.getAddedJars 2016-07-30 23:05:03 -07:00
scala-2.11/src [SPARK-16540][YARN][CORE] Avoid adding jars twice for Spark running on yarn 2016-07-14 10:40:59 -07:00
src [SPARK-16736][CORE][SQL] purge superfluous fs calls 2016-08-17 11:43:01 -07:00
pom.xml [SPARK-16770][BUILD] Fix JLine dependency management and version (Sca… 2016-08-03 17:07:10 -07:00