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

    https://github.com/apache/spark/pull/19829#discussion_r155115222
  
    --- Diff: 
common/network-common/src/main/java/org/apache/spark/network/crypto/TransportCipher.java
 ---
    @@ -203,6 +203,63 @@ public long transfered() {
           return transferred;
         }
     
    +    @Override
    --- End diff --
    
    I prototyped this change internally for a different reason, and I chose to 
create an abstract class for all this boilerplate, which seems cleaner to me.
    
    ```
    public abstract class AbstractFileRegion extends AbstractReferenceCounted 
implements FileRegion {
    
      @Override
      @SuppressWarnings("deprecation")
      public final long transfered() {
        return transferred();
      }
    
      @Override
      public FileRegion retain() {
        super.retain();
        return this;
      }
    
      @Override
      public FileRegion retain(int increment) {
        super.retain(increment);
        return this;
      }
    
      @Override
      public FileRegion touch() {
        return touch(null);
      }
    
      @Override
      public FileRegion touch(Object hint) {
        return this;
      }
    
    }
    ```


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to