zuston commented on code in PR #471:
URL: https://github.com/apache/incubator-uniffle/pull/471#discussion_r1070753360


##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -200,7 +199,13 @@ public StatusCode registerShuffle(
   public StatusCode cacheShuffleData(
       String appId, int shuffleId, boolean isPreAllocated, 
ShufflePartitionedData spd) {
     refreshAppId(appId);
-    return shuffleBufferManager.cacheShuffleData(appId, shuffleId, 
isPreAllocated, spd);
+    return shuffleBufferManager.cacheShuffleData(
+        appId,
+        shuffleId,
+        isPreAllocated,
+        spd,
+        (appIdx, shuffleIdx, partitionIdx) -> getPartitionDataSize(appIdx, 
shuffleIdx, partitionIdx)

Review Comment:
   > Java prefers to use Method Reference directly? -> 
this::getPartitionDataSize
   
   Got it.
   
   > I have another concern about this, getPartitionDataSize refers 
shuffleTaskInfos, which might leaking shuffleTaskInfos to ShuffleBufferManager, 
is there any better ways?
   
   Emm... I have no ideas



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

Reply via email to