hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kun Ren <ren.h...@gmail.com>
Subject server.java and RPC.java
Date Wed, 04 May 2016 01:43:36 GMT
Hi Genius,

I don't understand the following code segment in the server.java:

              value =
                call.connection.user.doAs
                  (new PrivilegedExceptionAction<Writable>() {
                     @Override
                     public Writable run() throws Exception {
                       // make the call
                       return call(call.rpcKind,
call.connection.protocolName,
                                   call.getRpcRequest(), call.timestamp);

                     }
                   }
                  );


I know that it will call the following code in the RPC.java:
    public Writable call(RPC.RpcKind rpcKind, String protocol,
        Writable rpcRequest, long receiveTime) throws Exception {
      return getRpcInvoker(rpcKind).call(this, protocol, rpcRequest,
          receiveTime);
    }


Could you please explain how it is related between server.java and
RPC.java, and why the call in the server.java will call the call in the
RPC.java? Thanks a lot in advance.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message