sujith71955 commented on a change in pull request #23429: [SPARK-26432][CORE] Obtain HBase delegation token operation compatible with HBase 2.x.x version API URL: https://github.com/apache/spark/pull/23429#discussion_r247311894
########## File path: core/src/main/scala/org/apache/spark/deploy/security/HBaseDelegationTokenProvider.scala ########## @@ -50,12 +52,59 @@ private[security] class HBaseDelegationTokenProvider creds.addToken(token.getService, token) } catch { case NonFatal(e) => - logWarning(s"Failed to get token from service $serviceName", e) + logWarning(s"Failed to get token from service $serviceName. " + + s"Retrying to invoke service with hbase connection.") + // Seems to be spark is trying to get the token from HBase 2.x.x version or above where the + // obtainToken(Configuration conf) API is been removed. Lets try obtaining the token from + // another compatible API of HBase service. + obtainDelegationTokensWithHBaseConn(hadoopConf, creds) } - None } + /** + * The HBase client API used in below method is introduced from HBase 0.98.9,1.0.0 version + * to invoke this api first connection object has to be retrieved from ConnectionFactory and the + * same connection can be passed to + * Token<AuthenticationTokenIdentifier> obtainToken(Connection conn) API + * + * @param hadoopConf Review comment: updated the comment. thnks. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org