zuston commented on code in PR #2720:
URL: https://github.com/apache/uniffle/pull/2720#discussion_r2731229236
##########
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:
Yes. Here it is guaranteed that the codec has been set. However, for the
current codec implementation, we cannot compress a composed ByteBuf. Therefore,
getData() still requires continuous memory.
--
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]