Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8627

NPE thrown if unable to fetch token from Namenode

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      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)
      

        Attachments

        1. HDFS-8627.2.patch
          3 kB
          J.Andreina
        2. HDFS-8627.1.patch
          3 kB
          J.Andreina

          Activity

            People

            • Assignee:
              andreina J.Andreina
              Reporter:
              andreina J.Andreina
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: