You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/04/21 07:13:51 UTC

[GitHub] [hive] aasha commented on a change in pull request #987: HIVE-23235 Fix checkpointing for ORC Tables

aasha commented on a change in pull request #987:
URL: https://github.com/apache/hive/pull/987#discussion_r411930184



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/repl/CopyUtils.java
##########
@@ -383,10 +385,17 @@ private void doRegularCopyOnce(FileSystem sourceFs, List<Path> srcList,
         throw new IOException(e);
       }
     } else {
+      deleteSubDirs(destinationFs, destination);
       FileUtil.copy(sourceFs, paths, destinationFs, destination, false, true, hiveConf);
     }
   }
 
+  private void deleteSubDirs(FileSystem destinationFs, Path destination) throws IOException {
+    for (FileStatus status : destinationFs.listStatus(destination)) {

Review comment:
       We need the destination folder to be present. Thats an extra FS call if we delete first and recreate again.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org