■ length: 每個protobuf類型的數據都包含一個length字段, 這是因爲, 在HDFS寫入操作時, 使用了writeDelimitedTo()方法。 這個方法會先寫入數據的length, 然後再寫入數據。
■ RpcRequestHeaderProto: RPC調用頭域, 保存了callId、 clientId、 rpcKind等重要信息。 服務器發回的響應消息中會帶回clientId、 callId等信息, 用於提取call、 鑑權等。
■ RpcRequest: 要特別注意, 這裏的RpcRequest是在ProtobufRpcEngine.Invoker.invoke()方法中構造的RpcRequestWrapper類。 其中包括兩個部分。
requestHeader: 請求元信息, 在什麼接口上調用什麼方法。 例如在ClientProtocol接口上調用了rename()方法。
requestParam: 請求參數, 使用protobuf包裝的, 例如rename()請求的RenameRequestProto參數。