diff options
author | Marcelo Vanzin <vanzin@cloudera.com> | 2015-10-07 11:38:47 -0700 |
---|---|---|
committer | Marcelo Vanzin <vanzin@cloudera.com> | 2015-10-07 11:38:47 -0700 |
commit | 6ca27f855075d65eb4535f1f2ed4fc9e68744231 (patch) | |
tree | f5005e109296833d179ecf40255452b9388c602f /core/src/main/scala/org/apache | |
parent | 4b74755122d51edb1257d4f3785fb24508681068 (diff) | |
download | spark-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 'core/src/main/scala/org/apache')
-rw-r--r-- | core/src/main/scala/org/apache/spark/scheduler/cluster/YarnSchedulerBackend.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/scheduler/cluster/YarnSchedulerBackend.scala b/core/src/main/scala/org/apache/spark/scheduler/cluster/YarnSchedulerBackend.scala index 6a4b536dee..e0107f9d3d 100644 --- a/core/src/main/scala/org/apache/spark/scheduler/cluster/YarnSchedulerBackend.scala +++ b/core/src/main/scala/org/apache/spark/scheduler/cluster/YarnSchedulerBackend.scala @@ -169,7 +169,7 @@ private[spark] abstract class YarnSchedulerBackend( override def receive: PartialFunction[Any, Unit] = { case RegisterClusterManager(am) => logInfo(s"ApplicationMaster registered as $am") - amEndpoint = Some(am) + amEndpoint = Option(am) case AddWebUIFilter(filterName, filterParams, proxyBase) => addWebUIFilter(filterName, filterParams, proxyBase) |