Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
DelegationTokenFetcher#saveDelegationToken
Missed to check if token is null.
Token<?> token = fs.getDelegationToken(renewer);
Credentials cred = new Credentials();
cred.addToken(token.getKind(), token);
XXXXXXXXXXXXXXXXXX:~/hadoop/namenode/bin> ./hdfs fetchdt --renewer Rex /home/REX/file1 Exception in thread "main" java.lang.NullPointerException at org.apache.hadoop.hdfs.tools.DelegationTokenFetcher.saveDelegationToken(DelegationTokenFetcher.java:181) at org.apache.hadoop.hdfs.tools.DelegationTokenFetcher$1.run(DelegationTokenFetcher.java:126) at java.security.AccessController.doPrivileged(AccessController.java:314) at javax.security.auth.Subject.doAs(Subject.java:572) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1666) at org.apache.hadoop.hdfs.tools.DelegationTokenFetcher.main(DelegationTokenFetcher.java:114)