Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14497 Logs for KMS delegation token lifecycle
  3. HADOOP-13720

Add more info to the msgs printed in AbstractDelegationTokenSecretManager for better supportability

VotersStop watchingWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Currently AbstractDelegationTokenSecretManager$checkToken does

        protected DelegationTokenInformation checkToken(TokenIdent identifier)
            throws InvalidToken {
          assert Thread.holdsLock(this);
          DelegationTokenInformation info = getTokenInfo(identifier);
          if (info == null) {
            throw new InvalidToken("token (" + identifier.toString()
                + ") can't be found in cache");
          }
          if (info.getRenewDate() < Time.now()) {
            throw new InvalidToken("token (" + identifier.toString() + ") is expired");
          }
          return info;
        } 
      

      When a token is expried, we throw the above exception without printing out the info.getRenewDate() in the message. If we print it out, we could know for how long the token has not been renewed. This will help us investigate certain issues.

      Create this jira as a request to add that part.

      Attachments

        1. HADOOP-13720.007.patch
          14 kB
          Yongjun Zhang
        2. HADOOP-13720.006.patch
          14 kB
          Yongjun Zhang
        3. HADOOP-13720.005.patch
          9 kB
          Yongjun Zhang
        4. HADOOP-13720.004.patch
          7 kB
          Yongjun Zhang
        5. HADOOP-13720.003.patch
          7 kB
          Yongjun Zhang
        6. HADOOP-13720.002.patch
          5 kB
          Yongjun Zhang
        7. HADOOP-13720.001.patch
          1 kB
          Yongjun Zhang

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            yzhangal Yongjun Zhang
            yzhangal Yongjun Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment