rickyma commented on code in PR #1758:
URL: 
https://github.com/apache/incubator-uniffle/pull/1758#discussion_r1621653829


##########
server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java:
##########
@@ -506,14 +506,24 @@ public void reportShuffleResult(
         "appId[" + appId + "], shuffleId[" + shuffleId + "], taskAttemptId[" + 
taskAttemptId + "]";
 
     try {
+      int expected =
+          partitionToBlockIds.values().stream().map(x -> x.length).reduce(0, 
(a, b) -> a + b);

Review Comment:
   This is more readable:
   `int expected = partitionToBlockIds.values().stream().mapToInt(x -> 
x.length).sum();`



##########
server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java:
##########
@@ -506,14 +506,24 @@ public void reportShuffleResult(
         "appId[" + appId + "], shuffleId[" + shuffleId + "], taskAttemptId[" + 
taskAttemptId + "]";
 
     try {
+      int expected =

Review Comment:
   Maybe `expectedNum` and `updatedNum`?



##########
server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java:
##########
@@ -506,14 +506,24 @@ public void reportShuffleResult(
         "appId[" + appId + "], shuffleId[" + shuffleId + "], taskAttemptId[" + 
taskAttemptId + "]";
 
     try {
+      int expected =
+          partitionToBlockIds.values().stream().map(x -> x.length).reduce(0, 
(a, b) -> a + b);
       LOG.info(
-          "Report "
-              + partitionToBlockIds.size()
-              + " blocks as shuffle result for the task of "
-              + requestInfo);
-      shuffleServer
-          .getShuffleTaskManager()
-          .addFinishedBlockIds(appId, shuffleId, partitionToBlockIds, 
bitmapNum);
+          "Accepted {} blockIds report of {} partitions as shuffle result for 
the task of {}",

Review Comment:
   I think the log could be more readable: 
   ```
   LOG.info(
             "Accepted blockIds report for {} blocks across {} partitions as 
shuffle result for task {}",
             expectedNum,
             partitionToBlockIds.size(),
             request);  
   ```



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