Victsm commented on a change in pull request #30433:
URL: https://github.com/apache/spark/pull/30433#discussion_r538908610



##########
File path: 
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java
##########
@@ -370,26 +391,19 @@ public MergeStatuses 
finalizeShuffleMerge(FinalizeShuffleMerge msg) throws IOExc
         new MergeStatuses(msg.shuffleId, new RoaringBitmap[0], new int[0], new 
long[0]);
     } else {
       Collection<AppShufflePartitionInfo> partitionsToFinalize = 
shufflePartitions.values();
-      int totalPartitions = partitionsToFinalize.size();
-      RoaringBitmap[] bitmaps = new RoaringBitmap[totalPartitions];
-      int[] reduceIds = new int[totalPartitions];
-      long[] sizes = new long[totalPartitions];
+      List<RoaringBitmap> bitmaps = new 
ArrayList<>(partitionsToFinalize.size());
+      List<Integer> reduceIds = new ArrayList<>(partitionsToFinalize.size());
+      List<Long> sizes = new ArrayList<>(partitionsToFinalize.size());

Review comment:
       We could alternatively still maintain the arrays to avoid array copying 
towards the end.
   We can handle the null bitmaps on the driver side after it receives the 
MergeStatuses.




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



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

Reply via email to