diff --git hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java index e71bc04..5aed3b3 100644 --- hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java +++ hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java @@ -108,6 +108,16 @@ public Path open(String user, Configuration conf) 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; } }