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 2021/03/24 15:13:45 UTC

[GitHub] [hive] ayushtkn commented on a change in pull request #2043: HIVE-24852. Add support for Snapshots during external table replication.

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



##########
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;

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



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