File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -200,10 +200,12 @@ object YarnSparkHadoopUtil {
200200 .map(new Path (_).getFileSystem(hadoopConf))
201201 .getOrElse(FileSystem .get(hadoopConf))
202202
203+ val accessAllFileSystem = sparkConf.get(FILESYSTEMS_TO_ACCESS_ALL )
204+
203205 // Add the list of available namenodes for all namespaces in HDFS federation.
204206 // If ViewFS is enabled, this is skipped as ViewFS already handles delegation tokens for its
205207 // namespaces.
206- val hadoopFilesystems = if (stagingFS.getScheme == " viewfs" ) {
208+ val hadoopFilesystems = if (accessAllFileSystem || stagingFS.getScheme == " viewfs" ) {
207209 Set .empty
208210 } else {
209211 val nameservices = hadoopConf.getTrimmedStrings(" dfs.nameservices" )
Original file line number Diff line number Diff line change @@ -243,6 +243,14 @@ package object config {
243243 " that hosts fs.defaultFS does not need to be listed here." )
244244 .fallbackConf(NAMENODES_TO_ACCESS )
245245
246+ private [spark] val FILESYSTEMS_TO_ACCESS_ALL =
247+ ConfigBuilder (" spark.yarn.access.all.hadoopFileSystems" )
248+ .doc(" Whether to get tokens of all filesystem configured in hdfs-site.xml. " +
249+ " The default value is false. " +
250+ " If true, a filesystem failed to get token may cause the entire job failed." )
251+ .booleanConf
252+ .createWithDefault(false )
253+
246254 /* Rolled log aggregation configuration. */
247255
248256 private [spark] val ROLLED_LOG_INCLUDE_PATTERN =
You can’t perform that action at this time.
0 commit comments