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

    https://github.com/apache/spark/pull/9987#discussion_r46188209
  
    --- Diff: 
network/common/src/main/java/org/apache/spark/network/protocol/AbstractResponseMessage.java
 ---
    @@ -17,23 +17,15 @@
     
     package org.apache.spark.network.protocol;
     
    -import com.google.common.base.Objects;
    -import io.netty.buffer.ByteBuf;
    -
     import org.apache.spark.network.buffer.ManagedBuffer;
    -import org.apache.spark.network.buffer.NettyManagedBuffer;
     
     /**
    - * Abstract class for response messages that contain a large data portion 
kept in a separate
    - * buffer. These messages are treated especially by MessageEncoder.
    + * Abstract class for response messages.
      */
    -public abstract class ResponseWithBody implements ResponseMessage {
    -  public final ManagedBuffer body;
    -  public final boolean isBodyInFrame;
    +public abstract class AbstractResponseMessage extends AbstractMessage 
implements ResponseMessage {
    --- End diff --
    
    That would require dummy implementations in `ChunkFetchFailure`, 
`RpcFailure` and `StreamFailure`...
    
    I actually don't see a lot of value in having separate interfaces for 
`ResponseMessage` and `RequestMessage`; this is not Scala, so you can't have a 
`sealed trait` and have the compiler help you when you miss something in a 
match. So you could just have `Message` with no need for any of the other 
interfaces / abstract classes. But I didn't want to do that cleanup in this 
change.


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