JackWangCS commented on pull request #14841:
URL: https://github.com/apache/flink/pull/14841#issuecomment-842810784


   Hi @zuston , `TokenCache.obtainTokensForNamenodes` need to pass in a set of 
paths. In the context of `HadoopFSDelegationTokenProvider`, it's a bit complex 
to constrcut the paths(both from uploader and extra paths to access) and it's 
unnecessary to do it. So HadoopFSDelegationTokenProvider use the 
`fs.addDelegationTokens` to obtain token directly(). In fact, Spark also use 
this method.
   
   `TokenCache.obtainTokensForNamenodes` also call the `fs.addDelegationTokens` 
to obtain tokens in its implementation.
   See: 
https://github.com/hanborq/hadoop/blob/99babec26a5f42021c0ec2a39ee7dbad4387b176/src/mapred/org/apache/hadoop/mapreduce/security/TokenCache.java#L115
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to