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

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

                Author: ASF GitHub Bot
            Created on: 12/Oct/21 04:48
            Start Date: 12/Oct/21 04:48
    Worklog Time Spent: 10m 
      Work Description: ArkoSharma commented on a change in pull request #2539:
URL: https://github.com/apache/hive/pull/2539#discussion_r726757597



##########
File path: common/src/java/org/apache/hadoop/hive/common/FileUtils.java
##########
@@ -705,6 +705,16 @@ public static boolean distCpWithSnapshot(String 
oldSnapshot, String newSnapshot,
             oldSnapshot, newSnapshot);
     } catch (IOException e) {
       LOG.error("Can not copy using snapshot from source: {}, target: {}", 
srcPaths, dst);
+      try {
+        // in case overwriteTarget is set to false, and we encounter an 
exception due to targetFs getting
+        // changed since last snapshot, then fallback to initial copy
+        if (!overwriteTarget && !e.getCause().getMessage().contains("changed 
since snapshot")) {
+          LOG.warn("Diff copy failed due to changed target filesystem, falling 
back to normal distcp.");
+          return distCp(srcPaths.get(0).getFileSystem(conf), srcPaths, dst, 
false, proxyUser, conf, shims);

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.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

    Worklog Id:     (was: 663872)
    Time Spent: 2h 40m  (was: 2.5h)

> Snapshot support for controlled failover
> ----------------------------------------
>
>                 Key: HIVE-25397
>                 URL: https://issues.apache.org/jira/browse/HIVE-25397
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Arko Sharma
>            Assignee: Arko Sharma
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> In case the same locations are used for external tables on the source and 
> target, then the snapshots created during replication can be re-used during 
> reverse replication. This patch enables re-using the snapshots  during 
> reverse replication using a configuration.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to