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

    https://github.com/apache/spark/pull/7820#discussion_r36031680
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/CoarseMesosSchedulerBackend.scala
 ---
    @@ -261,7 +269,27 @@ private[spark] class CoarseMesosSchedulerBackend(
         val taskId = status.getTaskId.getValue.toInt
         val state = status.getState
         logInfo(s"Mesos task $taskId is now $state")
    +    val slaveId: String = status.getSlaveId.getValue
         stateLock.synchronized {
    +      if (TaskState.fromMesos(state).equals(TaskState.RUNNING) &&
    +        slaveIdsToShuffleEndpoints.contains(slaveId)) {
    +        val rpcAddress = slaveIdsToShuffleEndpoints.remove(slaveId).get
    +        logDebug(s"Connecting to shuffle service on slave ${slaveId}, " +
    +            s"address $rpcAddress for app ${conf.getAppId}")
    +        sc.env.rpcEnv.asyncSetupEndpointRef(
    +          MesosExternalShuffleService.SYSTEM_NAME,
    +          rpcAddress,
    +          MesosExternalShuffleService.ENDPOINT_NAME).onComplete { ref =>
    +          if (ref.isSuccess) {
    +            ref.get.send(RegisterMesosDriver(conf.getAppId, 
sc.env.rpcEnv.address))
    +          } else {
    +            logWarning(s"Unable to connect to shuffle service for slave 
${slaveId}" +
    +              s", please manually remove shuffle data after driver exit. " 
+
    +              s"Error: ${ref.failed.get}")
    +          }
    --- End diff --
    
    these blocks need to be indented


---
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