Skip to content

Commit 8ff6be1

Browse files
committed
address review comments
1 parent 37c430c commit 8ff6be1

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,9 @@ private[spark] class Client(
351351
// SPARK-37205: this regex is used to grep a list of configurations and send them to YARN RM
352352
// for fetching delegation tokens. See YARN-5910 for more details.
353353
// The feature is only supported in Hadoop 3.x and up, hence the check below.
354-
val regex = sparkConf.get(config.AM_SEND_TOKEN_CONF)
354+
val regex = sparkConf.get(config.AM_TOKEN_CONF_REGEX)
355355
if (regex.nonEmpty && VersionUtils.isHadoop3) {
356-
logInfo(s"Processing token conf (spark.yarn.am.sendTokenConf) with regex $regex")
356+
logInfo(s"Processing token conf (spark.yarn.am.tokenConfRegex) with regex $regex")
357357
val dob = new DataOutputBuffer();
358358
val copy = new Configuration(false);
359359
copy.clear();

resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/config.scala

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,19 @@ package object config extends Logging {
7878
.booleanConf
7979
.createWithDefault(false)
8080

81-
private[spark] val AM_SEND_TOKEN_CONF =
82-
ConfigBuilder("spark.yarn.am.sendTokenConf")
81+
private[spark] val AM_TOKEN_CONF_REGEX =
82+
ConfigBuilder("spark.yarn.am.tokenConfRegex")
8383
.doc("This config is only supported for Hadoop 3.x profile. The value of this config is a " +
8484
"regex expression used to grep a list of config entries from the job's configuration " +
8585
"file (e.g., hdfs-site.xml) and send to RM, which uses them when renewing delegation " +
8686
"tokens. A typical use case of this feature is to support delegation tokens in an " +
8787
"environment where a YARN cluster needs to talk to multiple downstream HDFS clusters, " +
8888
"where the YARN RM may not have configs (e.g., dfs.nameservices, dfs.ha.namenodes.*, " +
89-
"dfs.namenode.rpc-address.*) to connect to these clusters. This config is very similar " +
90-
"to 'mapreduce.job.send-token-conf'. Please check YARN-5910 for more details.")
89+
"dfs.namenode.rpc-address.*) to connect to these clusters. In this scenario, Spark " +
90+
"users can specify the config value to be " +
91+
"'^dfs.nameservices$|^dfs.namenode.rpc-address.*$|^dfs.ha.namenodes.*$' to parse " +
92+
"these HDFS configs from the job's local configuration files. This config is very " +
93+
"similar to 'mapreduce.job.send-token-conf'. Please check YARN-5910 for more details.")
9194
.version("3.3.0")
9295
.stringConf
9396
.createOptional

0 commit comments

Comments
 (0)