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

    https://github.com/apache/spark/pull/3849#discussion_r22829776
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackend.scala
 ---
    @@ -290,13 +291,22 @@ private[spark] class MesosSchedulerBackend(
           .setType(Value.Type.SCALAR)
           
.setScalar(Value.Scalar.newBuilder().setValue(scheduler.CPUS_PER_TASK).build())
           .build()
    +    // Encode the attemptId as part of the data payload, since there's not 
a MesosTaskInfo field
    +    // to hold it:
    +    val data: ByteString = {
    +      val serializedTask = task.serializedTask
    +      val dataBuffer = ByteBuffer.allocate(4 + serializedTask.limit())
    +      dataBuffer.putInt(task.attemptNumber)
    +      dataBuffer.put(serializedTask)
    --- End diff --
    
    Can we introduce another wrapper here instead? I'm imagine we will be 
adding more fields to serialize to Mesos executors, and it's a lot easier to 
maintain a struct then position with types and offsets.


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