Skip to content

Commit

Permalink
[SPARK-21159][CORE] Don't try to connect to launcher in standalone cl…
Browse files Browse the repository at this point in the history
…uster mode.

Monitoring for standalone cluster mode is not implemented (see SPARK-11033), but
the same scheduler implementation is used, and if it tries to connect to the
launcher it will fail. So fix the scheduler so it only tries that in client mode;
cluster mode applications will be correctly launched and will work, but monitoring
through the launcher handle will not be available.

Tested by running a cluster mode app with "SparkLauncher.startApplication".

Author: Marcelo Vanzin <vanzin@cloudera.com>

Closes #18397 from vanzin/SPARK-21159.
  • Loading branch information
Marcelo Vanzin authored and cloud-fan committed Jun 24, 2017
1 parent b837bf9 commit bfd73a7
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -58,7 +58,13 @@ private[spark] class StandaloneSchedulerBackend(

override def start() {
super.start()
launcherBackend.connect()

// SPARK-21159. The scheduler backend should only try to connect to the launcher when in client
// mode. In cluster mode, the code that submits the application to the Master needs to connect
// to the launcher instead.
if (sc.deployMode == "client") {
launcherBackend.connect()
}

// The endpoint for executors to talk to us
val driverUrl = RpcEndpointAddress(
Expand Down

0 comments on commit bfd73a7

Please sign in to comment.