aboutsummaryrefslogtreecommitdiff
path: root/yarn/src
diff options
context:
space:
mode:
authorMarcelo Vanzin <vanzin@cloudera.com>2015-10-07 11:38:47 -0700
committerMarcelo Vanzin <vanzin@cloudera.com>2015-10-07 11:38:47 -0700
commit6ca27f855075d65eb4535f1f2ed4fc9e68744231 (patch)
treef5005e109296833d179ecf40255452b9388c602f /yarn/src
parent4b74755122d51edb1257d4f3785fb24508681068 (diff)
downloadspark-6ca27f855075d65eb4535f1f2ed4fc9e68744231.tar.gz
spark-6ca27f855075d65eb4535f1f2ed4fc9e68744231.tar.bz2
spark-6ca27f855075d65eb4535f1f2ed4fc9e68744231.zip
[SPARK-10964] [YARN] Correctly register the AM with the driver.
The `self` method returns null when called from the constructor; instead, registration should happen in the `onStart` method, at which point the `self` reference has already been initialized. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #9005 from vanzin/SPARK-10964.
Diffstat (limited to 'yarn/src')
-rw-r--r--yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala b/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
index 0df31736c1..a2ccdc05d7 100644
--- a/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
+++ b/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
@@ -556,7 +556,9 @@ private[spark] class ApplicationMaster(
override val rpcEnv: RpcEnv, driver: RpcEndpointRef, isClusterMode: Boolean)
extends RpcEndpoint with Logging {
- driver.send(RegisterClusterManager(self))
+ override def onStart(): Unit = {
+ driver.send(RegisterClusterManager(self))
+ }
override def receive: PartialFunction[Any, Unit] = {
case x: AddWebUIFilter =>