steveloughran commented on a change in pull request #1872: Hadoop 16890: Change in expiry calculation for MSI token provider URL: https://github.com/apache/hadoop/pull/1872#discussion_r389575291
########## File path: hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/MsiTokenProvider.java ########## @@ -51,6 +55,35 @@ protected AzureADToken refreshToken() throws IOException { LOG.debug("AADToken: refreshing token from MSI"); AzureADToken token = AzureADAuthenticator .getTokenFromMsi(authEndpoint, tenantGuid, clientId, authority, false); + tokenFetchTime = System.currentTimeMillis(); return token; } + + /** + * Checks if the token is about to expire as per base expiry logic. + * Otherwise try to expire every 1 hour + * + * @return true if the token is expiring in next 1 hour Review comment: or if a token has never been fetched ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org