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



##########
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:
       I would prefer not sending null bitmaps. It seems awkward to do that. It 
is an API method so we also then have to document the API that it can send 
`nulls`. And what is the performance benefit? This happens once in finalize and 
the list will at most be few thousand elements big. Making the code optimize 
for this seems premature.




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