Skip to content

Commit

Permalink
Depend on results of Hive file deletion.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddrinka committed Mar 5, 2020
1 parent bb7002d commit 6753e49
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -223,8 +223,7 @@ private void mergeFiles(Iterable<TempFile> files, Consumer<Page> consumer)

for (TempFile tempFile : files) {
Path file = tempFile.getPath();
fileSystem.delete(file, false);
if (fileSystem.exists(file)) {
if (!fileSystem.delete(file, false)) {
throw new IOException("Failed to delete temporary file: " + file);
}
}
Expand Down Expand Up @@ -252,8 +251,7 @@ private void writeTempFile(Consumer<TempFileWriter> consumer)
private void cleanupFile(Path file)
{
try {
fileSystem.delete(file, false);
if (fileSystem.exists(file)) {
if (!fileSystem.delete(file, false)) {
throw new IOException("Delete failed");
}
}
Expand Down

0 comments on commit 6753e49

Please sign in to comment.