Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,25 @@ private[mesos] trait MesosSchedulerUtils extends Logging {
val ret = mesosDriver.run()
logInfo("driver.run() returned with code " + ret)
if (ret != null && ret.equals(Status.DRIVER_ABORTED)) {
error = Some(new SparkException("Error starting driver, DRIVER_ABORTED"))
markErr()
val ex = new SparkException("Error starting driver, DRIVER_ABORTED")
// if the driver gets aborted after the successful registration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/after the successful registration/after registration/g

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also to simplify the code, can we just throw SparkExecption here? Then the catch will then handle all cases

if (registerLatch.getCount == 0) {
throw ex
} else {
error = Some(ex)
markErr()
}
}
} catch {
case e: Exception =>
logError("driver.run() failed", e)
error = Some(e)
markErr()
// if any exception occurs after the successful registration
if (registerLatch.getCount == 0) {
throw e
} else {
error = Some(e)
markErr()
}
}
}
}.start()
Expand Down