ramitg254 commented on code in PR #6981:
URL: https://github.com/apache/hive/pull/6981#discussion_r4784311870
##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -5277,7 +5295,46 @@ private static Path mvFile(HiveConf conf, FileSystem
sourceFs, Path sourcePath,
isRenameAllowed);
if (isRenameAllowed) {
- destFs.rename(sourcePath, destFilePath);
+ // Filesystems that take the per-query _copy_<tag> name do not use a
numeric _copy_N
+ // counter. Parsing that tag as a counter throws or rewrites the name,
so rename once.
Review Comment:
the fix is limited to atomic rename fs ones and which copy_N pattern only,
in case of non atomic ones we want to avoid this fix so there is no scenario of
having query tag in atomic ones case based on:
https://github.com/apache/hive/blob/5f23d5ef916dd66ca9178bf442fea64a059290f9/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java#L5212
so distinguishing factor is : `FileUtils.isNonAtomicRenameFs(destFs)`
updated the comment and added exception here for rename returning false in
order to avoid false success scenarios.
please check commit: 5d875760d2081607e4ce642879cea23a1063bc92
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]