Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Incomplete
-
None
-
None
Description
Looking for a refactor to HadoopFSDelegationTokenProvider. Within the function obtainDelegationTokens():
This code-block:
val fetchCreds = fetchDelegationTokens(getTokenRenewer(hadoopConf),...) // Get the token renewal interval if it is not set. It will only be called once. if (tokenRenewalInterval == null) { tokenRenewalInterval = getTokenRenewalInterval(...) }
calls fetchDelegationTokens() twice since the tokenRenewalInterval will always be null upon creation of the TokenManager which I think is unnecessary in the case of Kubernetes (as you are creating 2 DTs when only one is needed.) Could this possibly be refactored to only call fetchDelegationTokens() once upon startup or to have a param to specify tokenRenewalInterval