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
19
19
20
20
import org .apache .spark .{Logging , SecurityManager , SparkConf }
21
21
import org .apache .spark .util .{IntParam , Utils }
22
-
23
22
import java .io .File
24
23
import org .apache .spark .deploy .mesos .ui .MesosClusterUI
25
24
import org .apache .spark .deploy .rest .MesosRestServer
26
25
import org .apache .spark .scheduler .cluster .mesos .{ClusterScheduler , MesosClusterScheduler }
26
+ import java .util .concurrent .CountDownLatch
27
27
28
28
/*
29
29
* A dispatcher actor that is responsible for managing drivers, that is intended to
@@ -63,6 +63,9 @@ private [spark] class MesosClusterDispatcher(
63
63
}
64
64
65
65
object MesosClusterDispatcher {
66
+
67
+ val shutdownLatch = new CountDownLatch (1 )
68
+
66
69
def main (args : Array [String ]) {
67
70
val conf = new SparkConf
68
71
val dispatcherArgs = new ClusterDispatcherArguments (args, conf)
@@ -76,10 +79,8 @@ object MesosClusterDispatcher {
76
79
dispatcherArgs.webUiPort,
77
80
conf,
78
81
scheduler).start()
79
- this .synchronized {
80
- // block indefinitely
81
- this .wait() // TODO: bad
82
- }
82
+
83
+ shutdownLatch.await()
83
84
}
84
85
85
86
class ClusterDispatcherArguments (args : Array [String ], conf : SparkConf ) {
You can’t perform that action at this time.
0 commit comments