XComp commented on a change in pull request #19192:
URL: https://github.com/apache/flink/pull/19192#discussion_r832180611



##########
File path: 
flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaInvocationHandler.java
##########
@@ -282,22 +288,27 @@ private Object invokeRpc(Method method, Object[] args) 
throws Exception {
      *
      * @param declaringClassName of the RPC
      * @param methodName of the RPC
+     * @param isLocalRpcInvocation whether the RPC must be sent as a local 
message
      * @param parameterTypes of the RPC
      * @param args of the RPC
      * @return RpcInvocation message which encapsulates the RPC details
      * @throws IOException if we cannot serialize the RPC invocation parameters
      */
-    protected RpcInvocation createRpcInvocationMessage(
+    private RpcInvocation createRpcInvocationMessage(

Review comment:
       It was unnecessarily labeled as `protected`, wasn't it?

##########
File path: 
flink-core/src/main/java/org/apache/flink/configuration/AkkaOptions.java
##########
@@ -30,6 +32,18 @@
 @PublicEvolving
 public class AkkaOptions {
 
+    @Internal
+    @Documentation.ExcludeFromDocumentation("Internal use only")

Review comment:
       Can we add more documentation here? Some description on what this 
configuration option is used for

##########
File path: 
flink-rpc/flink-rpc-akka/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaInvocationHandler.java
##########
@@ -282,22 +288,27 @@ private Object invokeRpc(Method method, Object[] args) 
throws Exception {
      *
      * @param declaringClassName of the RPC
      * @param methodName of the RPC
+     * @param isLocalRpcInvocation whether the RPC must be sent as a local 
message
      * @param parameterTypes of the RPC
      * @param args of the RPC
      * @return RpcInvocation message which encapsulates the RPC details
      * @throws IOException if we cannot serialize the RPC invocation parameters
      */
-    protected RpcInvocation createRpcInvocationMessage(
+    private RpcInvocation createRpcInvocationMessage(
             final String declaringClassName,
             final String methodName,
+            final boolean isLocalRpcInvocation,
             final Class<?>[] parameterTypes,
             final Object[] args)
             throws IOException {
         final RpcInvocation rpcInvocation;
 
-        if (isLocal) {
+        if (isLocal && (!forceRpcInvocationSerialization || 
isLocalRpcInvocation)) {
             rpcInvocation =
                     new LocalRpcInvocation(declaringClassName, methodName, 
parameterTypes, args);
+        } else if (forceRpcInvocationSerialization) {
+            rpcInvocation =
+                    new RemoteRpcInvocation(declaringClassName, methodName, 
parameterTypes, args);

Review comment:
       This `else if` triggers the same content as the `else` branch.




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