zhijiangW commented on a change in pull request #10375: [FLINK-14845][runtime] 
Introduce data compression to reduce disk and network IO of shuffle.
URL: https://github.com/apache/flink/pull/10375#discussion_r353531919
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
 ##########
 @@ -173,6 +179,10 @@ public ResultPartitionType getPartitionType() {
                return partitionType;
        }
 
+       public BufferCompressor getBufferCompressor() {
 
 Review comment:
   Instead of providing getter method, we can provide a utility method to be 
used by both pipelined and blocking subpartitions. 
   
   ```
   boolean canBeCompressed(Buffer buffer) {
        return bufferCompressor != null && buffer.isBuffer() && 
buffer.readableBytes() > 0;
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to