hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yjzhan...@apache.org
Subject hadoop git commit: YARN-5048. DelegationTokenRenewer#skipTokenRenewal may throw NPE (Jian He via Yongjun Zhang)
Date Sat, 07 May 2016 05:51:22 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 8653bcbe6 -> 5ae5b869a


YARN-5048. DelegationTokenRenewer#skipTokenRenewal may throw NPE (Jian He via Yongjun Zhang)

(cherry picked from commit 47c41e7ac7e6b905a58550f8899f629c1cf8b138)


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

Branch: refs/heads/branch-2.8
Commit: 5ae5b869aa1be5b878957a5ec288c3dbc28900c3
Parents: 8653bcb
Author: Yongjun Zhang <yzhang@cloudera.com>
Authored: Fri May 6 21:50:09 2016 -0700
Committer: Yongjun Zhang <yzhang@cloudera.com>
Committed: Fri May 6 22:43:44 2016 -0700

----------------------------------------------------------------------
 .../resourcemanager/security/DelegationTokenRenewer.java    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/5ae5b869/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java
index cca14e9..fd12f11 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java
@@ -539,9 +539,14 @@ public class DelegationTokenRenewer extends AbstractService {
    */
   private boolean skipTokenRenewal(Token<?> token)
       throws IOException {
+
     @SuppressWarnings("unchecked")
-    Text renewer = ((Token<AbstractDelegationTokenIdentifier>)token).
-        decodeIdentifier().getRenewer();
+    AbstractDelegationTokenIdentifier identifier =
+        ((Token<AbstractDelegationTokenIdentifier>) token).decodeIdentifier();
+    if (identifier == null) {
+      return false;
+    }
+    Text renewer = identifier.getRenewer();
     return (renewer != null && renewer.toString().equals(""));
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message