Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
added null check
  • Loading branch information
ifilonenko committed Mar 26, 2019
commit 1325903dc34cd7c92dbdd20df2a95a665a914eae
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,13 @@ public void abort(Throwable error) {
} catch (Exception e) {
log.error("Unable to close appropriate underlying file stream", e);
}
if (!outputTempFile.delete() && outputTempFile.exists()) {
log.warn("Failed to delete temporary shuffle file at {}", outputTempFile.getAbsolutePath());
}
if (!outputFile.delete() && outputFile.exists()) {
log.warn("Failed to delete output shuffle file at {}", outputFile.getAbsolutePath());
if (outputTempFile != null) {
if (!outputTempFile.delete() && outputTempFile.exists()) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch the ordering of the statements in this boolean condition.

log.warn("Failed to delete temporary shuffle file at {}", outputTempFile.getAbsolutePath());
}
if (!outputFile.delete() && outputFile.exists()) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I don't think we want to delete here - a concurrent attempt shouldn't have its results removed if this attempt fails. I think this lines up with the behavior from the original shuffle writer.

log.warn("Failed to delete output shuffle file at {}", outputFile.getAbsolutePath());
}
}
}

Expand Down