[
https://issues.apache.org/jira/browse/HBASE-17048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15695024#comment-15695024
]
ramkrishna.s.vasudevan commented on HBASE-17048:
------------------------------------------------
bq. If so, bb.remaining() will give a wrong result. I have some doubt.
Good catch. I had a doubt but I forgot to check it. Will see once.
bq.Why can't pass the underlying alloc at time of constructor?
The netty code has some similar API which accepts allocator as an arg. Hence
that way.
bq.So the new class act as a wrapper and this handles the bytesWritten.
I did not want that to be a wrapper to create all the buffers. Because
internally we also create other buffers with a specified size. I added aPI to
act as a wrapper so all allocations happen via this but I was not sure if it is
really the purpose of this class. Because in some cases
bq. ByteBuf checksumBuf = alloc.directBuffer(checksumLen);
We already know what length we want.
bq.Pls add code level comment abt the algo in guess(). This is taken from some
of our existi
I can add comment. From where was this code taken you mean? I did not see it.
> Introduce a helper class to calcuate suitable ByteBuf size when allocating
> send buffer in FanOutOneBlockAsyncDFSOutputHelper
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-17048
> URL: https://issues.apache.org/jira/browse/HBASE-17048
> Project: HBase
> Issue Type: Sub-task
> Components: wal
> Affects Versions: 2.0.0
> Reporter: Duo Zhang
> Assignee: ramkrishna.s.vasudevan
> Fix For: 2.0.0
>
> Attachments: HBASE-17012_3.patch, HBASE-17048.patch,
> HBASE-17048_1.patch
>
>
> As [~ram_krish] mentioned in HBASE-17021
> https://issues.apache.org/jira/browse/HBASE-17021?focusedCommentId=15646938&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15646938
> The default ByteBuf size is 256B which is too small.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)