Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2365#discussion_r74688165
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaInvocationHandler.java
 ---
    @@ -25,33 +25,42 @@
     import org.apache.flink.runtime.rpc.MainThreadExecutor;
     import org.apache.flink.runtime.rpc.RpcTimeout;
     import org.apache.flink.runtime.rpc.akka.messages.CallAsync;
    +import org.apache.flink.runtime.rpc.akka.messages.LocalRpcInvocation;
    +import org.apache.flink.runtime.rpc.akka.messages.RemoteRpcInvocation;
     import org.apache.flink.runtime.rpc.akka.messages.RpcInvocation;
     import org.apache.flink.runtime.rpc.akka.messages.RunAsync;
     import org.apache.flink.util.Preconditions;
    +import org.apache.log4j.Logger;
     import scala.concurrent.Await;
     import scala.concurrent.Future;
     import scala.concurrent.duration.FiniteDuration;
     
    +import java.io.IOException;
     import java.lang.annotation.Annotation;
     import java.lang.reflect.InvocationHandler;
     import java.lang.reflect.Method;
     import java.util.BitSet;
     import java.util.concurrent.Callable;
     
     /**
    - * Invocation handler to be used with a {@link AkkaRpcActor}. The 
invocation handler wraps the
    - * rpc in a {@link RpcInvocation} message and then sends it to the {@link 
AkkaRpcActor} where it is
    + * Invocation handler to be used with an {@link AkkaRpcActor}. The 
invocation handler wraps the
    + * rpc in a {@link LocalRpcInvocation} message and then sends it to the 
{@link AkkaRpcActor} where it is
      * executed.
      */
     class AkkaInvocationHandler implements InvocationHandler, AkkaGateway, 
MainThreadExecutor {
    +   private static final Logger LOG = 
Logger.getLogger(AkkaInvocationHandler.class);
    +
        private final ActorRef rpcServer;
     
        // default timeout for asks
        private final Timeout timeout;
     
    -   AkkaInvocationHandler(ActorRef rpcServer, Timeout timeout) {
    +   private final long maximumFramesize;
    +
    +   AkkaInvocationHandler(ActorRef rpcServer, Timeout timeout, long 
maximumFramesize) {
    --- End diff --
    
    How expensive is the `isLocalActorRef()` call? Does it make sense to call 
it once here and have a flag `isLocal`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to