Skip to content

Commit

Permalink
[SPARK-8687] [YARN] Fix bug: Executor can't fetch the new set configu…
Browse files Browse the repository at this point in the history
…ration in yarn-client

Spark initi the properties CoarseGrainedSchedulerBackend.start
```scala
    // TODO (prashant) send conf instead of properties
    driverEndpoint = rpcEnv.setupEndpoint(
      CoarseGrainedSchedulerBackend.ENDPOINT_NAME, new DriverEndpoint(rpcEnv, properties))
```
Then the yarn logic will set some configuration but not update in this `properties`.
So `Executor` won't gain the `properties`.

[Jira](https://issues.apache.org/jira/browse/SPARK-8687)

Author: huangzhaowei <[email protected]>

Closes apache#7066 from SaintBacchus/SPARK-8687 and squashes the following commits:

1de4f48 [huangzhaowei] Ensure all necessary properties have already been set before startup ExecutorLaucher

(cherry picked from commit 1b0c8e6)
Signed-off-by: Andrew Or <[email protected]>
  • Loading branch information
SaintBacchus authored and Andrew Or committed Jul 2, 2015
1 parent e33c0f0 commit 7cbfef2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ private[spark] class YarnClientSchedulerBackend(
* This waits until the application is running.
*/
override def start() {
super.start()
val driverHost = conf.get("spark.driver.host")
val driverPort = conf.get("spark.driver.port")
val hostport = driverHost + ":" + driverPort
Expand All @@ -56,6 +55,12 @@ private[spark] class YarnClientSchedulerBackend(
totalExpectedExecutors = args.numExecutors
client = new Client(args, conf)
appId = client.submitApplication()

// SPARK-8687: Ensure all necessary properties have already been set before
// we initialize our driver scheduler backend, which serves these properties
// to the executors
super.start()

waitForApplication()
monitorThread = asyncMonitorApplication()
monitorThread.start()
Expand Down

0 comments on commit 7cbfef2

Please sign in to comment.