spark-instrumented-optimizer/core/src/main
Stephen Haberman b0d884f044 [SPARK-6560][CORE] Do not suppress exceptions from writer.write.
If there is a failure in the Hadoop backend while calling
writer.write, we should remember this original exception,
and try to call writer.close(), but if that fails as well,
still report the original exception.

Note that, if writer.write fails, it is likely that writer
was left in an invalid state, and so actually makes it more
likely that writer.close will also fail. Which just increases
the chances for writer.write's exception to be suppressed.

This patch introduces an admittedly potentially too cute
Utils.tryWithSafeFinally method to handle the try/finally
gyrations.

Author: Stephen Haberman <stephen@exigencecorp.com>

Closes #5223 from stephenh/do_not_suppress_writer_exception and squashes the following commits:

c7ad53f [Stephen Haberman] [SPARK-6560][CORE] Do not suppress exceptions from writer.write.
2015-04-03 09:48:37 +01:00
..
java/org/apache/spark SPARK-5984: Fix TimSort bug causes ArrayOutOfBoundsException 2015-02-28 18:55:34 -08:00
resources/org/apache/spark [SPARK-6597][Minor] Replace input:checkbox with input[type="checkbox"] in additional-metrics.js 2015-04-01 11:11:56 +01:00
scala/org/apache/spark [SPARK-6560][CORE] Do not suppress exceptions from writer.write. 2015-04-03 09:48:37 +01:00