huxinqiu opened a new pull request, #5156:
URL: https://github.com/apache/hadoop/pull/5156
In the RPC Client, before a request (including RpcRequestHeaderProto,
RequestHeaderProto, Message Payload) is sent, they will be copied to the three
CodedOutputStream internal byte arrays, and then aggregated to the
ResponseBuffer internal byte array. Then the ResponseBuffer byte array is
written to a BufferedOutputStream and finally to a SocketOutputStream.
To simplify the writing process, Maybe we can copy them directly to a big
CodedOutputStream and send them directly to the IpcStreams#out. To achieve
this, I propose
[HADOOP-18533](https://issues.apache.org/jira/browse/HADOOP-18533). But it
brings the following two side effects.
1. The generic declaration of rpcRequestQueue inside Client has been changed
to Object
2. The serialization of protobuf has been moved to rpcRequestThread, because
rpcRequestThread is a single thread for each connection, which may have a
performance impact.
For the above reasons, I propose this. This pr brings the following
benefits
1. For each rpc request, avoid creating a ResponseBuffer of 1024 bytes
2. For each rpc request, combine the three fragmented CodedOutputStreams
into one
3. No side effects like
[HADOOP-18533](https://issues.apache.org/jira/browse/HADOOP-18533)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]