You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by th...@apache.org on 2016/07/19 06:04:48 UTC

hive git commit: HIVE-13883 : WebHCat leaves token crc file never gets deleted (Niklaus Xiao via Thejas Nair)

Repository: hive
Updated Branches:
  refs/heads/master 1245d0d74 -> 137365170


HIVE-13883 : WebHCat leaves token crc file never gets deleted (Niklaus Xiao via Thejas Nair)


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

Branch: refs/heads/master
Commit: 13736517062e5b8efd87b18bee2da0c106634c5a
Parents: 1245d0d
Author: Niklaus Xiao <st...@live.cn>
Authored: Mon Jul 18 23:04:40 2016 -0700
Committer: Thejas Nair <th...@hortonworks.com>
Committed: Mon Jul 18 23:04:40 2016 -0700

----------------------------------------------------------------------
 .../hive/hcatalog/templeton/SecureProxySupport.java       | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/13736517/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java
----------------------------------------------------------------------
diff --git a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java
index e71bc04..5aed3b3 100644
--- a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java
+++ b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java
@@ -108,6 +108,16 @@ public class SecureProxySupport {
   public void close() {
     if (tokenPath != null) {
       new File(tokenPath.toUri()).delete();
+      String checksumStr = tokenPath.getParent() + File.separator + "." + tokenPath.getName() + ".crc";
+      File checksumFile = null;
+      try {
+        checksumFile = new File(new URI(checksumStr));
+        if (checksumFile.exists()) {
+          checksumFile.delete();
+        }
+      } catch (URISyntaxException e) {
+        LOG.error("Failed to delete token crc file.", e);
+      }
       tokenPath = null;
     }
   }