[
https://issues.apache.org/jira/browse/HADOOP-9163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13540207#comment-13540207
]
Todd Lipcon commented on HADOOP-9163:
-------------------------------------
Hey Sanjay,
Rather than actually constructing an RpcRequestBody object using its builder,
you would serialize it like so:
{code}
Message param = (Message)params[0];
cos.writeTag(RpcResponse.RESPONSE_FIELD_NUMBER,
WireFormat.WIRETYPE_LENGTH_DELIMITED);
cos.flush()
param.writeDelimitedTo(out)
out.flush()
{code}
or, if you use a BufferChain object like in HBASE-5945, you can do this with a
little bit less messy code. The idea is to "manually" serialize the
RpcRequestBody protobuf to the wire, and then when you get to the point where
you want to push in the parameter, you ask the parameter to serialize itself to
the wire.
> The rpc msg in ProtobufRpcEngine.proto should be moved out to avoid an extra
> copy
> ----------------------------------------------------------------------------------
>
> Key: HADOOP-9163
> URL: https://issues.apache.org/jira/browse/HADOOP-9163
> Project: Hadoop Common
> Issue Type: Sub-task
> Reporter: Sanjay Radia
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira