Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/5234#discussion_r27451154
--- Diff:
network/common/src/main/java/org/apache/spark/network/protocol/MessageEncoder.java
---
@@ -72,9 +80,84 @@ public void encode(ChannelHandlerContext ctx, Message
in, List<Object> out) {
in.encode(header);
assert header.writableBytes() == 0;
- out.add(header);
if (body != null && bodyLength > 0) {
- out.add(body);
+ out.add(new MessageWithHeader(header, headerLength, body,
bodyLength));
+ } else {
+ out.add(header);
}
}
+
+ /**
+ * A wrapper message that holds two separate pieces (a header and a
body) to avoid
+ * copying the body's content.
+ */
+ private static class MessageWithHeader extends AbstractReferenceCounted
implements FileRegion {
--- End diff --
Yes - I think epoll won't work and we should just disable it. We'd need
more work on Netty proper to support epoll for 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]