[ 
https://issues.apache.org/jira/browse/HIVE-21717?focusedWorklogId=240871&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-240871
 ]

ASF GitHub Bot logged work on HIVE-21717:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/May/19 05:23
            Start Date: 13/May/19 05:23
    Worklog Time Spent: 10m 
      Work Description: maheshk114 commented on pull request #624: HIVE-21717 : 
Rename is failing for directory in move task
URL: https://github.com/apache/hive/pull/624#discussion_r283190551
 
 

 ##########
 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.
 
 Review comment:
   no what i meant is the delete is done (for file and directory) because 
rename can not handle directory ...
 
----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 240871)
    Time Spent: 1h 40m  (was: 1.5h)

> Rename is failing for directory in move task 
> ---------------------------------------------
>
>                 Key: HIVE-21717
>                 URL: https://issues.apache.org/jira/browse/HIVE-21717
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>    Affects Versions: 4.0.0
>            Reporter: mahesh kumar behera
>            Assignee: mahesh kumar behera
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>         Attachments: HIVE-21717.01.patch
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Rename fails with destination directory not empty in case a directory is move 
> directly to the table location from staging directory as rename cannot 
> overwrite non empty destination directory.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to