Repository: hive
Updated Branches:
  refs/heads/master 5e0615573 -> a2cfd9dfb


HIVE-17254: Skip updating AccessTime of recycled files in ReplChangeManager 
(Daniel Dai, reviewed by Thejas Nair)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/a2cfd9df
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/a2cfd9df
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/a2cfd9df

Branch: refs/heads/master
Commit: a2cfd9dfb199b9c6e17301a4cc2b6eed00ba7137
Parents: 5e06155
Author: Daniel Dai <da...@hortonworks.com>
Authored: Sat Aug 5 00:12:05 2017 -0700
Committer: Daniel Dai <da...@hortonworks.com>
Committed: Sat Aug 5 00:12:05 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/metastore/ReplChangeManager.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/a2cfd9df/metastore/src/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java
----------------------------------------------------------------------
diff --git 
a/metastore/src/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java 
b/metastore/src/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java
index b1edc8f..88d6a7a 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java
@@ -138,7 +138,7 @@ public class ReplChangeManager {
         // avoid race condition CM remove the file before setting
         // timestamp
         long now = System.currentTimeMillis();
-        fs.setTimes(path, now, now);
+        fs.setTimes(path, now, -1);
 
         boolean success = false;
         if (fs.exists(cmPath) && 
fileCheckSum.equalsIgnoreCase(checksumFor(cmPath, fs))) {
@@ -195,7 +195,7 @@ public class ReplChangeManager {
             LOG.debug("A file with the same content of {} already exists, 
ignore", path.toString());
           }
           // Need to extend the tenancy if we saw a newer file with the same 
content
-          fs.setTimes(cmPath, now, now);
+          fs.setTimes(cmPath, now, -1);
         }
 
         // Tag if we want to remain in trash after deletion.

Reply via email to