Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public class WriteBufferManager extends MemoryConsumer {
private long copyTime = 0;
private long serializeTime = 0;
private long compressTime = 0;
private long sortTime = 0;
private long writeTime = 0;
private long estimateTime = 0;
private long requireMemoryTime = 0;
Expand Down Expand Up @@ -372,9 +373,11 @@ public synchronized List<ShuffleBlockInfo> clear(double bufferSpillRatio) {
bufferSpillRatio = Math.max(0.1, Math.min(1.0, bufferSpillRatio));
List<Integer> partitionList = new ArrayList(buffers.keySet());
if (Double.compare(bufferSpillRatio, 1.0) < 0) {
long start = System.currentTimeMillis();
partitionList.sort(
Comparator.comparingInt(o -> buffers.get(o) == null ? 0 : buffers.get(o).getMemoryUsed())
.reversed());
sortTime += start;
targetSpillSize = (long) ((getUsedBytes() - getInSendListBytes()) * bufferSpillRatio);
}

Expand Down Expand Up @@ -643,6 +646,8 @@ public String getManagerCostInfo() {
+ writeTime
+ "], serializeTime["
+ serializeTime
+ "], sortTime["
+ sortTime
+ "], compressTime["
+ compressTime
+ "], estimateTime["
Expand Down
Loading