hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7979) Adding some utility methods in org.apache.hadoop.hbase.util.Bytes
Date Sat, 02 Mar 2013 13:59:14 GMT

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

Andrew Purtell commented on HBASE-7979:
---------------------------------------

+1

I've also needed recently:

{code}
void zero(byte[] b) - Fill array with zeros

void zero(byte[] b, int offset, int length) - Fill with zeros at offset

void random(byte[] b) - Fill with random bytes from SecureRandom

void random(byte[] b, int offset, int length) - Fill with random bytes from offset
{code}

These are easy if you think they could be included here. I can put up a patch also if you'd
like, just say. 

                
> Adding some utility methods in org.apache.hadoop.hbase.util.Bytes
> -----------------------------------------------------------------
>
>                 Key: HBASE-7979
>                 URL: https://issues.apache.org/jira/browse/HBASE-7979
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>             Fix For: 0.95.0, 0.98.0
>
>
> We can add some more utility methods in Bytes. Have seen some in Guava's Bytes class.
What I am thinking is adding
> contains(byte[],byte[])
> indexOf(byte[], byte[])
> This came under the discussion in HBASE-7928

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message