Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/3849#discussion_r22830201
--- 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 --
That's a good idea; putting the serialization / deserialization code in the
same wrapper class will make it much easier to verify that it's correct / test
it separately. I'll push a new commit to do this.
---
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]