File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -120,14 +120,25 @@ private[mesos] trait MesosSchedulerUtils extends Logging {
120120 val ret = mesosDriver.run()
121121 logInfo(" driver.run() returned with code " + ret)
122122 if (ret != null && ret.equals(Status .DRIVER_ABORTED )) {
123- error = Some (new SparkException (" Error starting driver, DRIVER_ABORTED" ))
124- markErr()
123+ val ex = new SparkException (" Error starting driver, DRIVER_ABORTED" )
124+ // if the driver gets aborted after the successful registration
125+ if (registerLatch.getCount == 0 ) {
126+ throw ex
127+ } else {
128+ error = Some (ex)
129+ markErr()
130+ }
125131 }
126132 } catch {
127133 case e : Exception =>
128134 logError(" driver.run() failed" , e)
129- error = Some (e)
130- markErr()
135+ // if any exception occurs after the successful registration
136+ if (registerLatch.getCount == 0 ) {
137+ throw e
138+ } else {
139+ error = Some (e)
140+ markErr()
141+ }
131142 }
132143 }
133144 }.start()
You can’t perform that action at this time.
0 commit comments