ayushtkn commented on a change in pull request #2043:
URL: https://github.com/apache/hive/pull/2043#discussion_r600589430



##########
File path: common/src/java/org/apache/hadoop/hive/common/FileUtils.java
##########
@@ -691,6 +690,31 @@ public static boolean distCp(FileSystem srcFS, List<Path> 
srcPaths, Path dst,
     return copied;
   }
 
+  public static boolean distCpWithSnapshot(FileSystem srcFs, String snap1,
+      String snap2, List<Path> srcPaths, Path dst,
+      UserGroupInformation proxyUser, HiveConf conf, HadoopShims shims) {
+    boolean copied;
+    try {
+      if (proxyUser == null) {
+        copied =
+            shims.runDistCpWithSnapshots(snap1, snap2, srcPaths, dst, conf);
+      } else {
+        copied = shims
+            .runDistCpWithSnapshotsAs(snap1, snap2, srcPaths, dst, conf,
+                proxyUser);
+      }
+    } catch (Exception e) {
+      LOG.error("Can not copy using snapshot from source: {}, target: {}",
+          srcPaths, dst);
+      copied = false;
+    }
+    if(copied)

Review comment:
       Done




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to