Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/10076#discussion_r46992341
--- Diff: core/src/main/scala/org/apache/spark/executor/Executor.scala ---
@@ -253,7 +253,7 @@ private[spark] class Executor(
val directResult = new DirectTaskResult(valueBytes, accumUpdates,
task.metrics.orNull)
val serializedDirectResult = ser.serialize(directResult)
- val resultSize = serializedDirectResult.limit
+ val resultSize = serializedDirectResult.remaining()
--- End diff --
I found I was wrong about the position of `ByteBuffer` from Netty. Netty
will call `ByteBuffer.slice` to reset the position to 0 before returning it:
https://github.com/netty/netty/blob/0f9492c9affc528c766f9677952412564d4a3f6d/buffer/src/main/java/io/netty/buffer/PooledHeapByteBuf.java#L269
I think we don't need this patch.
---
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]