Skip to content

Commit ddbcd16

Browse files
committed
review comments
1 parent 0ac8501 commit ddbcd16

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

docs/running-on-yarn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Most of the configs are the same for Spark on YARN as for other deployment modes
110110
<td><code>spark.yarn.access.namenodes</code></td>
111111
<td>(none)</td>
112112
<td>
113-
A list of secure HDFS namenodes your spark application is going to access. For example, spark.yarn.access.namenodes=hdfs://nn1.com:8032,hdfs://nn2.com:8032. Spark acquires security Tokens for each of the namenodes so that the spark application can access those remote HDFS clusters.
113+
A list of secure HDFS namenodes your Spark application is going to access. For example, `spark.yarn.access.namenodes=hdfs://nn1.com:8032,hdfs://nn2.com:8032`. The Spark application must have acess to the namenodes listed and Kerberos must be properly configured to be able to access them (either in the same realm or in a trusted realm). Spark acquires security tokens for each of the namenodes so that the Spark application can access those remote HDFS clusters.
114114
</td>
115115
</tr>
116116
</table>

yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,9 @@ object ClientBase extends Logging {
601601
YarnSparkHadoopUtil.addToEnvironment(env, Environment.CLASSPATH.name, path,
602602
File.pathSeparator)
603603

604-
// get the list of namenodes the user may access
604+
/**
605+
* Get the list of namenodes the user may access.
606+
*/
605607
private[yarn] def getNameNodesToAccess(sparkConf: SparkConf): Set[Path] = {
606608
sparkConf.get("spark.yarn.access.namenodes", "").split(",").map(_.trim()).filter(!_.isEmpty)
607609
.map(new Path(_)).toSet
@@ -618,7 +620,9 @@ object ClientBase extends Logging {
618620
delegTokenRenewer
619621
}
620622

621-
// obtains tokens for the namenodes passed in and adds them to the credentials
623+
/**
624+
* Obtains tokens for the namenodes passed in and adds them to the credentials.
625+
*/
622626
private[yarn] def obtainTokensForNamenodes(paths: Set[Path], conf: Configuration,
623627
creds: Credentials) {
624628
if (UserGroupInformation.isSecurityEnabled()) {

0 commit comments

Comments
 (0)