turboFei commented on code in PR #3158:
URL: https://github.com/apache/celeborn/pull/3158#discussion_r2013393825


##########
client/src/main/scala/org/apache/celeborn/client/commit/ReducePartitionCommitHandler.scala:
##########
@@ -337,14 +349,44 @@ class ReducePartitionCommitHandler(
                   shufflePushFailedBatches.getOrDefault(
                     shuffleId,
                     new util.HashMap[String, util.Set[PushFailedBatch]]()))
-              
context.asInstanceOf[RemoteNettyRpcCallContext].nettyEnv.serialize(returnedMsg)
+
+              val serializedMsg =
+                
context.asInstanceOf[RemoteNettyRpcCallContext].nettyEnv.serialize(returnedMsg)
+
+              if (getReducerFileGroupResponseBroadcastEnabled &&
+                serializedMsg.capacity() >= 
getReducerFileGroupResponseBroadcastMiniSize) {
+                val broadcastMsg = broadcastGetReducerFileGroup(shuffleId, 
returnedMsg)
+                if (broadcastMsg != returnedMsg) {
+                  val serializedBroadcastMsg =
+                    
context.asInstanceOf[RemoteNettyRpcCallContext].nettyEnv.serialize(broadcastMsg)
+                  logInfo(s"Shuffle $shuffleId GetReducerFileGroupResponse 
size" +
+                    s" ${serializedMsg.capacity()} reached the broadcast 
threshold" +
+                    s" $getReducerFileGroupResponseBroadcastMiniSize," +
+                    s" the broadcast response size is 
${serializedBroadcastMsg.capacity()}.")

Review Comment:
   > How much bandwidth can be saved for this RPC response? Maybe adding some 
logs here can be helpful.
   Hi @FMX Here is the log.
   
   



##########
client/src/main/scala/org/apache/celeborn/client/commit/ReducePartitionCommitHandler.scala:
##########
@@ -337,14 +349,44 @@ class ReducePartitionCommitHandler(
                   shufflePushFailedBatches.getOrDefault(
                     shuffleId,
                     new util.HashMap[String, util.Set[PushFailedBatch]]()))
-              
context.asInstanceOf[RemoteNettyRpcCallContext].nettyEnv.serialize(returnedMsg)
+
+              val serializedMsg =
+                
context.asInstanceOf[RemoteNettyRpcCallContext].nettyEnv.serialize(returnedMsg)
+
+              if (getReducerFileGroupResponseBroadcastEnabled &&
+                serializedMsg.capacity() >= 
getReducerFileGroupResponseBroadcastMiniSize) {
+                val broadcastMsg = broadcastGetReducerFileGroup(shuffleId, 
returnedMsg)
+                if (broadcastMsg != returnedMsg) {
+                  val serializedBroadcastMsg =
+                    
context.asInstanceOf[RemoteNettyRpcCallContext].nettyEnv.serialize(broadcastMsg)
+                  logInfo(s"Shuffle $shuffleId GetReducerFileGroupResponse 
size" +
+                    s" ${serializedMsg.capacity()} reached the broadcast 
threshold" +
+                    s" $getReducerFileGroupResponseBroadcastMiniSize," +
+                    s" the broadcast response size is 
${serializedBroadcastMsg.capacity()}.")

Review Comment:
   > How much bandwidth can be saved for this RPC response? Maybe adding some 
logs here can be helpful.
   
   
   Hi @FMX Here is the log.
   
   



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

Reply via email to