Index: hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java (revision 1573334) +++ hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java (revision ) @@ -215,7 +215,6 @@ @Override public void commitJob(JobContext jobContext) throws IOException { - try { if (dynamicPartitioningUsed) { discoverPartitions(jobContext); // Commit each partition so it gets moved out of the job work @@ -247,10 +246,11 @@ } } } - } finally { + + // Commit has succeeded (since no exceptions have been thrown.) + // Safe to cancel delegation tokens now. cancelDelegationTokens(jobContext); - } + } - } @Override public void cleanupJob(JobContext context) throws IOException { @@ -970,7 +970,7 @@ } private void cancelDelegationTokens(JobContext context) throws IOException{ - LOG.info("Cancelling deletgation token for the job."); + LOG.info("Cancelling delegation token for the job."); HiveMetaStoreClient client = null; try { HiveConf hiveConf = HCatUtil