[
https://issues.apache.org/jira/browse/HBASE-13817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14571937#comment-14571937
]
Anoop Sam John commented on HBASE-13817:
----------------------------------------
bq.May be the first version is better?
Can we have a consensus? Ram is it ok to commit V2 (after Stack's comment fix).
StreamUtils is generic util API that we provided. We get BBOS when we write
to CellBlock in RPC layer. Ya today the util API is called only in this place.
Still !!! May be later we can see whether we can move this common to some
place.
> ByteBufferOuputStream - add writeInt support
> --------------------------------------------
>
> Key: HBASE-13817
> URL: https://issues.apache.org/jira/browse/HBASE-13817
> Project: HBase
> Issue Type: Sub-task
> Components: Scanners
> Reporter: Anoop Sam John
> Assignee: Anoop Sam John
> Fix For: 2.0.0
>
> Attachments: HBASE-13817.patch, HBASE-13817_V2.patch, benchmark.zip
>
>
> While writing Cells to this stream, to make the CellBlock ByteBuffer, we do
> write length of the cell as int. We use StreamUtils to do this which will
> write each byte one after the other. So 4 write calls on Stream.(OutputSteam
> has only this support) With ByteBufferOuputStream we have the overhead of
> checking for size limit and possible grow with every write call. Internally
> this stream writes to a ByteBuffer. Again inside the ByteBuffer
> implementations there is position limit checks. If we do write these length
> as int in one go we can reduce this overhead.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)