Skip to content

Commit fc8feaa

Browse files
shekhar.bansalsrowen
authored andcommitted
[SPARK-6653] [YARN] New config to specify port for sparkYarnAM actor system
Author: shekhar.bansal <[email protected]> Closes #5719 from zuxqoj/master and squashes the following commits: 5574ff7 [shekhar.bansal] [SPARK-6653][yarn] New config to specify port for sparkYarnAM actor system 5117258 [shekhar.bansal] [SPARK-6653][yarn] New config to specify port for sparkYarnAM actor system 9de5330 [shekhar.bansal] [SPARK-6653][yarn] New config to specify port for sparkYarnAM actor system 456a592 [shekhar.bansal] [SPARK-6653][yarn] New configuration property to specify port for sparkYarnAM actor system 803e93e [shekhar.bansal] [SPARK-6653][yarn] New configuration property to specify port for sparkYarnAM actor system
1 parent 4d29867 commit fc8feaa

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/running-on-yarn.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ Most of the configs are the same for Spark on YARN as for other deployment modes
133133
Same as <code>spark.yarn.driver.memoryOverhead</code>, but for the Application Master in client mode.
134134
</td>
135135
</tr>
136+
<tr>
137+
<td><code>spark.yarn.am.port</code></td>
138+
<td>(random)</td>
139+
<td>
140+
Port for the YARN Application Master to listen on. In YARN client mode, this is used to communicate between the Spark driver running on a gateway and the Application Master running on YARN. In YARN cluster mode, this is used for the dynamic executor feature, where it handles the kill from the scheduler backend.
141+
</td>
142+
</tr>
136143
<tr>
137144
<td><code>spark.yarn.queue</code></td>
138145
<td>default</td>

yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ private[spark] class ApplicationMaster(
285285
}
286286

287287
private def runExecutorLauncher(securityMgr: SecurityManager): Unit = {
288-
rpcEnv = RpcEnv.create("sparkYarnAM", Utils.localHostName, 0, sparkConf, securityMgr)
288+
val port = sparkConf.getInt("spark.yarn.am.port", 0)
289+
rpcEnv = RpcEnv.create("sparkYarnAM", Utils.localHostName, port, sparkConf, securityMgr)
289290
waitForSparkDriver()
290291
addAmIpFilter()
291292
registerAM(sparkConf.get("spark.driver.appUIAddress", ""), securityMgr)

0 commit comments

Comments
 (0)