Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13077#discussion_r94185533
  
    --- Diff: 
resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala
 ---
    @@ -559,15 +560,29 @@ private[spark] class MesosClusterScheduler(
           } else {
             val offer = offerOption.get
             val queuedTasks = tasks.getOrElseUpdate(offer.offerId, new 
ArrayBuffer[TaskInfo])
    -        val task = createTaskInfo(submission, offer)
    -        queuedTasks += task
    -        logTrace(s"Using offer ${offer.offerId.getValue} to launch driver 
" +
    -          submission.submissionId)
    -        val newState = new MesosClusterSubmissionState(submission, 
task.getTaskId, offer.slaveId,
    -          None, new Date(), None, getDriverFrameworkID(submission))
    -        launchedDrivers(submission.submissionId) = newState
    -        launchedDriversState.persist(submission.submissionId, newState)
    -        afterLaunchCallback(submission.submissionId)
    +        breakable {
    --- End diff --
    
    More of a style thing but why use breakable? can you just return from the 
exception case? or move the code following the catch into the try clause?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to