Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add spark.yarn.access.all.hadoopFileSystems
  • Loading branch information
wangyum committed Jul 9, 2018
commit 8885ffff03efe1bbc2afa86b24f15c0413d2c05d
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,12 @@ object YarnSparkHadoopUtil {
.map(new Path(_).getFileSystem(hadoopConf))
.getOrElse(FileSystem.get(hadoopConf))

val accessAllFileSystem = sparkConf.get(FILESYSTEMS_TO_ACCESS_ALL)

// Add the list of available namenodes for all namespaces in HDFS federation.
// If ViewFS is enabled, this is skipped as ViewFS already handles delegation tokens for its
// namespaces.
val hadoopFilesystems = if (stagingFS.getScheme == "viewfs") {
val hadoopFilesystems = if (accessAllFileSystem || stagingFS.getScheme == "viewfs") {
Set.empty
} else {
val nameservices = hadoopConf.getTrimmedStrings("dfs.nameservices")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,14 @@ package object config {
"that hosts fs.defaultFS does not need to be listed here.")
.fallbackConf(NAMENODES_TO_ACCESS)

private[spark] val FILESYSTEMS_TO_ACCESS_ALL =
ConfigBuilder("spark.yarn.access.all.hadoopFileSystems")
.doc("Whether to get tokens of all filesystem configured in hdfs-site.xml. " +
"The default value is false. " +
"If true, a filesystem failed to get token may cause the entire job failed.")
.booleanConf
.createWithDefault(false)

/* Rolled log aggregation configuration. */

private[spark] val ROLLED_LOG_INCLUDE_PATTERN =
Expand Down