Github user SaintBacchus commented on the pull request:
https://github.com/apache/spark/pull/8867#issuecomment-143173483
@tgravescs I had noticed the code of
`UserGroupInformation.loginUserFromKeytab(args.principal, args.keytab)`
After this login motivation, `yarn.Client` will change *KERBEROS* into
*TOKEN* for the purpose of setting the token for the AM.
```scala
/** Set up security tokens for launching our ApplicationMaster container.
*/
private def setupSecurityToken(amContainer: ContainerLaunchContext): Unit
= {
val dob = new DataOutputBuffer
credentials.writeTokenStorageToStream(dob)
amContainer.setTokens(ByteBuffer.wrap(dob.getData))
}
```
After this, the `Client` will use *TOKEN* in the RPC connection.
If I login again with keytab after this, the SAALClient will use *KERBEROS*
again, and this can avoid token expired exception.
I had tested the recent spark and it still will throw this exception.
---
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]