You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Jonathan Gray (JIRA)" <ji...@apache.org> on 2009/03/12 05:03:50 UTC

[jira] Updated: (HBASE-1260) Bytes utility class changes: remove usage of ByteBuffer and provide additional ByteBuffer primitives

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

Jonathan Gray updated HBASE-1260:
---------------------------------

    Attachment: hbase-1260-v1.patch

- Removes utility functions for doubles and floats which are not being used anywhere.
- Adds toShort(byte[]) and toBytes(short), completes missing toInt methods
- Slight re-ordering of some methods to make things grouped more appropriately.
- Fixes a couple comments which were mislabeled
- Adds an additional length check in toShort/toInt/toLong

And most importantly, removes all references and usage of ByteBuffer, replaced with byte operations... 
*except* Bytes.toBytes(ByteBuffer) which is used in the 5 places below:
{code}
Cell.java:88: this.valueMap.put(timestamp, Bytes.toBytes(bb));
Store.java:902: compactedOut.append(hsk.getBytes(), Bytes.toBytes(value));
Store.java:916: compactedOut.append(hsk.getBytes(), Bytes.toBytes(value));
Store.java:1096: results.get(readcol).add(Bytes.toBytes(value),
HalfHFileReader.java:189: return Bytes.toBytes(scanner.getKey());
{code}

The patch is a little hard to read because of re-org, but apply it and Bytes is easy to read.

> Bytes utility class changes: remove usage of ByteBuffer and provide additional ByteBuffer primitives
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-1260
>                 URL: https://issues.apache.org/jira/browse/HBASE-1260
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: util
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>             Fix For: 0.20.0
>
>         Attachments: hbase-1260-v1.patch
>
>
> Remove all references to ByteBuffer from Bytes utility class.
> Add putShort, putInt, putLong methods to replicate ByteBuffer functionality.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.