zuston commented on code in PR #2720:
URL: https://github.com/apache/uniffle/pull/2720#discussion_r2731233962


##########
client-spark/common/src/main/java/org/apache/spark/shuffle/writer/WriteBufferManager.java:
##########
@@ -425,24 +427,22 @@ public synchronized List<ShuffleBlockInfo> clear(double 
bufferSpillRatio) {
 
   protected ShuffleBlockInfo createDeferredCompressedBlock(
       int partitionId, WriterBuffer writerBuffer) {
-    byte[] data = writerBuffer.getData();
-    final int uncompressLength = data.length;
+    final int uncompressLength = writerBuffer.getDataLength();
     final int memoryUsed = writerBuffer.getMemoryUsed();
-    final long records = writerBuffer.getRecordCount();
 
     this.blockCounter.incrementAndGet();
     this.uncompressedDataLen += uncompressLength;
     this.inSendListBytes.addAndGet(memoryUsed);
 
     final long blockId =
         blockIdLayout.getBlockId(getNextSeqNo(partitionId), partitionId, 
taskAttemptId);
-
+    final byte[] rawData = writerBuffer.getData();

Review Comment:
   BTW, this PR is aimed at optimizing memory usage in Gluten when compression 
is disabled on the RSS side. In practice, the shuffle data generated by Gluten 
is still compressed on the Gluten side.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to