hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ramkrishna.s.vasudevan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-17235) Minor improvement in creation of CIS for onheap buffer cases
Date Fri, 02 Dec 2016 07:40:58 GMT

     [ https://issues.apache.org/jira/browse/HBASE-17235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

ramkrishna.s.vasudevan updated HBASE-17235:
-------------------------------------------
    Affects Version/s: 2.0.0
          Component/s: rpc

> Minor improvement in creation of CIS for onheap buffer cases
> ------------------------------------------------------------
>
>                 Key: HBASE-17235
>                 URL: https://issues.apache.org/jira/browse/HBASE-17235
>             Project: HBase
>          Issue Type: Improvement
>          Components: rpc
>    Affects Versions: 2.0.0
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Minor
>         Attachments: HBASE-17235.patch
>
>
> {code}
>       if (buf.hasArray()) {
>         cis = CodedInputStream.newInstance(buf.array(), offset, buf.limit());
>       } else {
> {code}
> Currently we do this for onheap buffers incase there is no reservoir or the size is less
than the minSizeforReservoir. I could see that even if reservoir is there there are requests
which goes with the above way of creating CIS. This could be made efficient to avoid underlying
copies by just doing this
> {code}
> cis = UnsafeByteOperations.unsafeWrap(buf.array(), offset, buf.limit()).newCodedInput();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message