Skip to content

Commit ccb246b

Browse files
committed
corrected implementation
1 parent 98fc658 commit ccb246b

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -672,14 +672,6 @@ private boolean rewriteFetchWorkForSafeCacheWrite(CacheEntry cacheEntry, FetchWo
672672
return true;
673673
}
674674

675-
/**
676-
* Copies each file from the fetch work into {@code resultDir}, preserving relative paths below
677-
* the safe-write prefix. Runs under {@link #rwLock} write lock so cache metadata and filesystem
678-
* layout stay consistent with other cache mutations.
679-
*
680-
* @param destFileStatuses output: destination {@link FileStatus} entries for successfully copied files
681-
* @return {@code true} if every file was copied and listed; {@code false} otherwise
682-
*/
683675
private boolean copyFetchWorkFilesIntoCacheDirUnderWriteLock(FetchWork fetchWork, Path resultDir,
684676
FileSystem cacheFs, int safeDirAndSepLen, HiveConf queryConf, Set<FileStatus> destFileStatuses) {
685677
final boolean[] succeeded = { true };
@@ -698,6 +690,7 @@ private boolean copyFetchWorkFilesIntoCacheDirUnderWriteLock(FetchWork fetchWork
698690
}
699691
} catch (IOException e) {
700692
LOG.warn("Failed to write cache entry to {}", resultDir, e);
693+
succeeded[0] = false;
701694
}
702695
});
703696
return succeeded[0];

0 commit comments

Comments
 (0)