HolyLow commented on code in PR #3177:
URL: https://github.com/apache/celeborn/pull/3177#discussion_r2024508329


##########
common/src/main/scala/org/apache/celeborn/common/rpc/netty/NettyRpcEnv.scala:
##########
@@ -504,6 +504,20 @@ private[celeborn] class RequestMessage(
       writeRpcAddress(out, senderAddress)
       writeRpcAddress(out, receiver.address)
       out.writeUTF(receiver.name)
+      val msg = Utils.toTransportMessage(content)
+      msg match {
+        case transMsg: TransportMessage =>
+          // Check if the msg is a TransportMessage with language-agnostic V2 
serdeVersion.
+          // If so, write the marker and the body explicitly.
+          if (transMsg.getSerdeVersion == SerdeVersion.V2) {
+            val out = new DataOutputStream(bos)
+            out.writeByte(SerdeVersion.V2.getMarker)
+            out.write(transMsg.toByteBuffer.array)
+            out.close()
+            return bos.toByteBuffer

Review Comment:
   I am not 100% percent sure that moving the logic to JavaSerializationStream 
would work as expected or not. Maybe we could refactor this after the e2e 
testcase for java-cpp joint test is ready.



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