You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Anoop Sam John (JIRA)" <ji...@apache.org> on 2014/03/24 07:58:43 UTC

[jira] [Comment Edited] (HBASE-10771) Primitive type put/get APIs in ByteRange

    [ https://issues.apache.org/jira/browse/HBASE-10771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13944787#comment-13944787 ] 

Anoop Sam John edited comment on HBASE-10771 at 3/24/14 6:57 AM:
-----------------------------------------------------------------

bq.I think we could name the put() as putInt, putShort, putLong and can have the variant with index as param also. 
WIth index as param,  APIs are there in BR (in the patch)
I thought it will be better to overload the same name with diff arguments. (Like OutputStream write etc). If u strongly feel otherwise I can change.
bq.public void put(PositionedByteRange buf);
+1 for this.  API can take offset and length also.  May be it can be an overloaded one.
bq.public int compare(int srcOffset, int srcLength, byte[] b, int offset, int length);
Not sure..  I feel these should go to some sort of comparator impl.

bq.public void copy(int srcOffset, byte[] dest, int destOffset, int length);
We have this ,get(int index, byte[] dst, int offset, int length),  same as copy.



was (Author: anoop.hbase):
bq.I think we could name the put() as putInt, putShort, putLong and can have the variant with index as param also. 
WIth index as param,  APIs are there in BR (in the patch)
I thought it will be better to overload the same name with diff arguments. (Like OutputStream write etc). If u strongly feel otherwise I can change.
bq.public void put(PositionedByteRange buf);
+1 for this. May be better it API can take offset and length also.  May be it can be an overloaded one.
bq.public int compare(int srcOffset, int srcLength, byte[] b, int offset, int length);
Not sure..  I feel these should go to some sort of comparator impl.

bq.public void copy(int srcOffset, byte[] dest, int destOffset, int length);
We have this get(int index, byte[] dst, int offset, int length) same as copy.


> Primitive type put/get APIs in ByteRange 
> -----------------------------------------
>
>                 Key: HBASE-10771
>                 URL: https://issues.apache.org/jira/browse/HBASE-10771
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>             Fix For: 0.99.0
>
>         Attachments: HBASE-10771.patch
>
>
> While doing HBASE-10713 I came across the need to write int/long (and read also) from a ByteRange.  CellBlocks are backed by ByteRange. So we can add such APIs.
> Also as per HBASE-10750  we return a ByteRange from MSLAB and also discussion under HBASE-10191 suggest we can have BR backed HFileBlocks etc.  



--
This message was sent by Atlassian JIRA
(v6.2#6252)