File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
core/src/main/scala/org/apache/spark/deploy/mesos Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ package org.apache.spark.deploy.mesos
1919
2020import org .apache .spark .{Logging , SecurityManager , SparkConf }
2121import org .apache .spark .util .{IntParam , Utils }
22-
2322import java .io .File
2423import org .apache .spark .deploy .mesos .ui .MesosClusterUI
2524import org .apache .spark .deploy .rest .MesosRestServer
2625import org .apache .spark .scheduler .cluster .mesos .{ClusterScheduler , MesosClusterScheduler }
26+ import java .util .concurrent .CountDownLatch
2727
2828/*
2929 * A dispatcher actor that is responsible for managing drivers, that is intended to
@@ -63,6 +63,9 @@ private [spark] class MesosClusterDispatcher(
6363}
6464
6565object MesosClusterDispatcher {
66+
67+ val shutdownLatch = new CountDownLatch (1 )
68+
6669 def main (args : Array [String ]) {
6770 val conf = new SparkConf
6871 val dispatcherArgs = new ClusterDispatcherArguments (args, conf)
@@ -76,10 +79,8 @@ object MesosClusterDispatcher {
7679 dispatcherArgs.webUiPort,
7780 conf,
7881 scheduler).start()
79- this .synchronized {
80- // block indefinitely
81- this .wait() // TODO: bad
82- }
82+
83+ shutdownLatch.await()
8384 }
8485
8586 class ClusterDispatcherArguments (args : Array [String ], conf : SparkConf ) {
You can’t perform that action at this time.
0 commit comments