[
https://issues.apache.org/jira/browse/HBASE-7905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13606050#comment-13606050
]
stack commented on HBASE-7905:
------------------------------
So, uploaded a patch for current trunk that adds a fairer test to ipc. This
time, the creation of the protobuf Message is included in the timings. That
makes it fair. We create a Put once with 1, 100, or 1000 Cells/KeyValues. We
then start a loop and in the loop we protobuf the put and then make an rpc
which returns nothing. We are measuring the convertion of the Put to a
protobuf and then sending the protobuf'd param to the server.
Here is for current trunk (NOT cellblocking as the patch attached here
provides):
{code}
RpcRequestBody.Builder builder = RpcRequestBody.newBuilder();
builder.setRequest(mr.toByteString());
builder.setMethodName(m.getName());
RpcRequestBody body = builder.build();
Message response = client.call(body, address, NothingProtocol.class,
user, 0);
{code}
mr in the above is a protobuf MultiRequest built out of the Put (The Put was
put into a RowMutation).
Here is what we do in the patch attached here I'm trying to get committed:
{code}
List<CellScannable> cells = new ArrayList<CellScannable>();
Message param =
RequestConverter.buildNoDataMultiRequest(HConstants.EMPTY_BYTE_ARRAY, rm,
cells);
CellScanner cellScanner = CellUtil.createCellScanner(cells);
Pair<Message, CellScanner> response =
client.call(m, param, cellScanner, address, NothingProtocol.class,
user, 0);
{code}
The rm in the above is the RowMutation made with same Put. We pass the
MultiRequest into the call.
When I do timings passing 1, 100, 1000 cells, the cellblock, the new cellblock
stuff is slightly slower when 1 cell but gets better the more cells you are
carrying:
Current TRUNK:
13/03/18 21:04:46 INFO ipc.TestIPC: Cycled 100000 time(s) with 1 cell(s) in
11505ms
13/03/18 21:04:14 INFO ipc.TestIPC: Cycled 100000 time(s) with 100 cell(s) in
12218ms
13/03/18 21:02:53 INFO ipc.TestIPC: Cycled 100000 time(s) with 1000 cell(s)
in 25562ms
CellBlock Patch:
13/03/18 21:07:28 INFO ipc.TestIPC: Cycled 100000 time(s) with 1 cell(s) in
12312ms
13/03/18 21:08:10 INFO ipc.TestIPC: Cycled 100000 time(s) with 100 cell(s) in
12348ms
13/03/18 21:08:52 INFO ipc.TestIPC: Cycled 100000 time(s) with 1000 cell(s)
in 20075ms
So, its probably ok saying that this cellblock stuff attached here doesn't make
things any worse than what we currently have.
> Add passing of optional cell blocks over rpc
> --------------------------------------------
>
> Key: HBASE-7905
> URL: https://issues.apache.org/jira/browse/HBASE-7905
> Project: HBase
> Issue Type: Sub-task
> Components: IPC/RPC
> Reporter: stack
> Assignee: stack
> Fix For: 0.95.0
>
> Attachments: 7900v12-depends-on-8101.txt, 7905.txt, 7905v13.txt,
> 7905v14.txt, 7905v15.txt, 7905v16.txt, 7905v17.txt, 7905v3.txt, 7905v4.txt,
> 7905v6.txt, 7905v8.txt, 7905v9.txt, testipc_for_pre_cellblocks.txt,
> testipc_pre_cellblocks_v2.txt
>
>
> Make it so we can pass Cells/data w/o having to bury it all in protobuf to
> get it over the wire.
--
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