jerqi commented on code in PR #2156:
URL:
https://github.com/apache/incubator-uniffle/pull/2156#discussion_r1792888055
##########
common/src/main/java/org/apache/uniffle/common/ShufflePartitionedData.java:
##########
@@ -20,31 +20,37 @@
import java.util.Arrays;
import com.google.common.annotations.VisibleForTesting;
-import org.apache.commons.lang3.tuple.Pair;
+import org.apache.commons.lang3.tuple.Triple;
public class ShufflePartitionedData {
private static final ShufflePartitionedBlock[] EMPTY_BLOCK_LIST =
new ShufflePartitionedBlock[] {};
private int partitionId;
private final ShufflePartitionedBlock[] blockList;
- private final long totalBlockSize;
+ private final long totalBlockEncodedLength;
+ private final long totalBlockDataLength;
- public ShufflePartitionedData(int partitionId, Pair<Long,
ShufflePartitionedBlock[]> pair) {
+ public ShufflePartitionedData(
+ int partitionId, Triple<Long, Long, ShufflePartitionedBlock[]> pair) {
this.partitionId = partitionId;
this.blockList = pair.getRight() == null ? EMPTY_BLOCK_LIST :
pair.getRight();
- totalBlockSize = pair.getLeft();
+ totalBlockEncodedLength = pair.getLeft();
+ totalBlockDataLength = pair.getMiddle();
}
@VisibleForTesting
public ShufflePartitionedData(int partitionId, ShufflePartitionedBlock[]
blockList) {
this.partitionId = partitionId;
this.blockList = blockList == null ? EMPTY_BLOCK_LIST : blockList;
- long size = 0L;
+ long encodedLength = 0L;
+ long dataLength = 0L;
for (ShufflePartitionedBlock block : this.blockList) {
- size += block.getSize();
+ encodedLength += block.getSize();
Review Comment:
Could we modify the name in the ShufflePartitionedBlock?
--
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]