diff options
author | Steve Loughran <stevel@hortonworks.com> | 2017-04-13 15:30:44 -0500 |
---|---|---|
committer | Imran Rashid <irashid@cloudera.com> | 2017-04-13 15:30:44 -0500 |
commit | 7536e2849df6d63587fbf16b4ecb5db06fed7125 (patch) | |
tree | e260cd335cf8ade3fd0c4ed503600efa859569f1 /sql/hive/src/main/scala/org/apache | |
parent | 8ddf0d2a60795a2306f94df8eac6e265b1fe5230 (diff) | |
download | spark-7536e2849df6d63587fbf16b4ecb5db06fed7125.tar.gz spark-7536e2849df6d63587fbf16b4ecb5db06fed7125.tar.bz2 spark-7536e2849df6d63587fbf16b4ecb5db06fed7125.zip |
[SPARK-20038][SQL] FileFormatWriter.ExecuteWriteTask.releaseResources() implementations to be re-entrant
## What changes were proposed in this pull request?
have the`FileFormatWriter.ExecuteWriteTask.releaseResources()` implementations set `currentWriter=null` in a finally clause. This guarantees that if the first call to `currentWriter()` throws an exception, the second releaseResources() call made during the task cancel process will not trigger a second attempt to close the stream.
## How was this patch tested?
Tricky. I've been fixing the underlying cause when I saw the problem [HADOOP-14204](https://issues.apache.org/jira/browse/HADOOP-14204), but SPARK-10109 shows I'm not the first to have seen this. I can't replicate it locally any more, my code no longer being broken.
code review, however, should be straightforward
Author: Steve Loughran <stevel@hortonworks.com>
Closes #17364 from steveloughran/stevel/SPARK-20038-close.
Diffstat (limited to 'sql/hive/src/main/scala/org/apache')
0 files changed, 0 insertions, 0 deletions