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 1ef5f27..0e341d3 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 @@ -104,6 +104,16 @@ public Path open(String user, Configuration conf) public void close() { if (tokenPath != null) { new File(tokenPath.toUri()).delete(); + String checksumStr = new StringBuilder().append(tokenPath.getParent()).append(File.separator).append(".").append(tokenPath.getName()).append(".crc").toString(); + 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; } }