From 1396867b52533ecf894158a464c6cd3abc7041b9 Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Tue, 27 Oct 2015 12:01:50 -0700 Subject: [PATCH] HADOOP-12494. fetchdt stores the token based on token kind instead of token service (HeeSoo Kim via aw) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../org/apache/hadoop/hdfs/tools/DelegationTokenFetcher.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 9ba6275409..e1addb2c38 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -516,6 +516,9 @@ Trunk (Unreleased) HADOOP-12515. Mockito dependency is missing in hadoop-kafka module. (Kai Zheng via aajisaka) + HADOOP-12494. fetchdt stores the token based on token kind instead + of token service (HeeSoo Kim via aw) + OPTIMIZATIONS HADOOP-7761. Improve the performance of raw comparisons. (todd) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DelegationTokenFetcher.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DelegationTokenFetcher.java index 803402dc94..39821aaff8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DelegationTokenFetcher.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DelegationTokenFetcher.java @@ -178,7 +178,7 @@ static void saveDelegationToken(Configuration conf, FileSystem fs, Token token = fs.getDelegationToken(renewer); if (null != token) { Credentials cred = new Credentials(); - cred.addToken(token.getKind(), token); + cred.addToken(token.getService(), token); cred.writeTokenStorageFile(tokenFile, conf); if (LOG.isDebugEnabled()) {