From 0f5142cc8ae00cde0ac96c09ae28c528d316823f Mon Sep 17 00:00:00 2001 From: Marcelo Vanzin Date: Mon, 25 Aug 2014 14:04:17 -0700 Subject: [PATCH] Review feedback. --- .../org/apache/spark/deploy/yarn/ApplicationMaster.scala | 3 ++- .../scala/org/apache/spark/deploy/yarn/YarnRMClient.scala | 2 +- .../org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala | 4 ++-- .../spark/scheduler/cluster/YarnClientSchedulerBackend.scala | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala index 5d80dd6c9c481..e8352bef4647e 100644 --- a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala +++ b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala @@ -190,7 +190,8 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments, conf = sparkConf, securityManager = securityMgr)._1 actor = waitForSparkDriver() addAmIpFilter() - registerAM(sparkConf.get("spark.driver.appUIAddress", ""), "") + registerAM(sparkConf.get("spark.driver.appUIAddress", ""), + sparkConf.get("spark.driver.appUIHistoryAddress", "")) // In client mode the actor will stop the reporter thread. reporterThread.join() diff --git a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/YarnRMClient.scala b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/YarnRMClient.scala index 3d6a7a012c75b..922d7d1a854a5 100644 --- a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/YarnRMClient.scala +++ b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/YarnRMClient.scala @@ -50,8 +50,8 @@ trait YarnRMClient { /** * Shuts down the AM. Guaranteed to only be called once. * - * @param registered Whether the AM was successfully registered with the RM. * @param status The final status of the AM. + * @param diagnostics Diagnostics message to include in the final status. */ def shutdown(status: FinalApplicationStatus, diagnostics: String = ""): Unit diff --git a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala index 719ca9f7583b2..2aa27a1908582 100644 --- a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala +++ b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala @@ -193,14 +193,14 @@ object YarnSparkHadoopUtil { } } - def lookupRack(conf: Configuration, host: String): String = { + private[spark] def lookupRack(conf: Configuration, host: String): String = { if (!hostToRack.contains(host)) { populateRackInfo(conf, host) } hostToRack.get(host) } - def populateRackInfo(conf: Configuration, hostname: String) { + private[spark] def populateRackInfo(conf: Configuration, hostname: String) { Utils.checkHost(hostname) if (!hostToRack.containsKey(hostname)) { diff --git a/yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala b/yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala index 4eba6c42658b0..a5f537dd9de30 100644 --- a/yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala +++ b/yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala @@ -19,7 +19,7 @@ package org.apache.spark.scheduler.cluster import org.apache.hadoop.yarn.api.records.{ApplicationId, YarnApplicationState} import org.apache.spark.{SparkException, Logging, SparkContext} -import org.apache.spark.deploy.yarn.{ApplicationMaster, Client, ClientArguments, YarnSparkHadoopUtil} +import org.apache.spark.deploy.yarn.{Client, ClientArguments, YarnSparkHadoopUtil} import org.apache.spark.scheduler.TaskSchedulerImpl import scala.collection.mutable.ArrayBuffer