Github user jerryshao commented on the issue:

    https://github.com/apache/spark/pull/19103
  
    @tgravescs , I think it is in `AMCredentialRenewer` we explicitly create a 
new `Credential` every time when issuing new tokens.
    
    ```
        // HACK:
        // HDFS will not issue new delegation tokens, if the Credentials object
        // passed in already has tokens for that FS even if the tokens are 
expired (it really only
        // checks if there are tokens for the service, and not if they are 
valid). So the only real
        // way to get new tokens is to make sure a different Credentials object 
is used each time to
        // get new tokens and then the new tokens are copied over the current 
user's Credentials.
        // So:
        // - we login as a different user and get the UGI
        // - use that UGI to get the tokens (see doAs block below)
        // - copy the tokens over to the current user's credentials (this will 
overwrite the tokens
        // in the current user's Credentials object for this FS).
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to