hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Liang <yanboha...@gmail.com>
Subject How to Implement the WritableRpcEngine and the code procedure
Date Tue, 24 Apr 2012 11:37:21 GMT
Hello,

There are two different kinds of RPC engine: RPC_WRITABLE
& RPC_PROTOCOL_BUFFER
In the NameNode side, the class NameNodeRpcServer is used to handle RPC
calls from client and DataNode.

But I see in the constructor function

public NameNodeRpcServer(Configuration conf, NameNode nn) throws
IOException {
..........
this.clientRpcServer = RPC.getServer(
        org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolPB.class,
        clientNNPbService, socAddr.getHostName(),
            socAddr.getPort(), handlerCount, false, conf,
            namesystem.getDelegationTokenSecretManager());
...........
}

Inside this function there are only protocolPB implementation in the
construction of RPC.Server,
I can not see the WritableRpcEngine implementation.

And when I trace into the class WritableRpcInvoker,
it is the absolutely invoke function. I meat that
{
................
protocolImpl =
                server.getProtocolImplMap(RpcKind.RPC_WRITABLE).get(pv);
................
}

I don't know which is the protcolImpl of RPC_WRITABLE, in the constructor
function only the implementation of RPC_PROTOCOL_BUFFER is created.

Anyone can give me some suggestion or advice?

Thank you
Eric

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