sankarh commented on a change in pull request #624: HIVE-21717 : Rename is
failing for directory in move task
URL: https://github.com/apache/hive/pull/624#discussion_r283179149
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
##########
@@ -4301,6 +4301,19 @@ public void recycleDirToCmPath(Path dataPath, boolean
isPurge) throws HiveExcept
}
}
+ private static void deleteAndRename(FileSystem destFs, Path destFile,
FileStatus srcStatus, Path destPath)
+ throws IOException {
+ if (destFs.exists(destFile)) {
+ // rename cannot overwrite non empty destination directory, so deleting
the destination before renaming.
+ destFs.delete(destFile);
Review comment:
In non DistributedFileSystem case, we were deleting with recursive flag as
false. But here we always keep it true. Does it have any impacts?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]