gaborgsomogyi commented on a change in pull request #23698: [SPARK-26766][CORE]
Remove the list of filesystems from
HadoopDelegationTokenProvider.obtainDelegationTokens
URL: https://github.com/apache/spark/pull/23698#discussion_r252722147
##########
File path:
core/src/main/scala/org/apache/spark/deploy/security/HadoopFSDelegationTokenProvider.scala
##########
@@ -133,3 +133,45 @@ private[deploy] class HadoopFSDelegationTokenProvider
if (renewIntervals.isEmpty) None else Some(renewIntervals.min)
}
}
+
+private[deploy] object HadoopFSDelegationTokenProvider {
+ def hadoopFSsToAccess(
+ sparkConf: SparkConf,
+ hadoopConf: Configuration): Set[FileSystem] = {
+ val filesystemsToAccess = sparkConf.get(FILESYSTEMS_TO_ACCESS)
+ val requestAllDelegationTokens = filesystemsToAccess.isEmpty
+
+ val master = sparkConf.get("spark.master")
+ val stagingFS = if (master != null && master.contains("yarn")) {
+ sparkConf.get(STAGING_DIR)
+ .map(new Path(_).getFileSystem(hadoopConf))
+ .getOrElse(FileSystem.get(hadoopConf))
+ } else {
Review comment:
Nice catch, fixed.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]