[
https://issues.apache.org/jira/browse/HBASE-12213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14613367#comment-14613367
]
Ted Yu commented on HBASE-12213:
--------------------------------
For MultiByteBufferInputStream :
{code}
+ if (len <= 0) {
+ return 0;
+ }
{code}
The above check can be lifted to beginning of method.
{code}
+ public long skip(long n) {
+ long k = Math.min(n, available());
+ if (k < 0) {
+ k = 0;
+ }
{code}
When k is 0, we can directly return from method, right ?
> HFileBlock backed by Array of ByteBuffers
> -----------------------------------------
>
> Key: HBASE-12213
> URL: https://issues.apache.org/jira/browse/HBASE-12213
> Project: HBase
> Issue Type: Sub-task
> Components: regionserver, Scanners
> Reporter: Anoop Sam John
> Assignee: ramkrishna.s.vasudevan
> Attachments: HBASE-12213_1.patch, HBASE-12213_2.patch
>
>
> In L2 cache (offheap) an HFile block might have been cached into multiple
> chunks of buffers. If HFileBlock need single BB, we will end up in recreation
> of bigger BB and copying. Instead we can make HFileBlock to serve data from
> an array of BBs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)