cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] Commented: (CASSANDRA-1998) Make offsets in ByteBufferUtil.* methods relatif to the ByteBuffer position()
Date Mon, 17 Jan 2011 19:43:45 GMT


Jonathan Ellis commented on CASSANDRA-1998:

As much as I hate the BB api i think it will be more confusing to mix theirs (there are a
LOT of get(x) calls outside of BBU) with our own, than to conform to the official API.

I'd love to replace BB with our own but I can't think of a way of doing that w/o compromising
the performance win that's the main reason to use BB, since all the JDK methods are going
to give you back HBB/DBB.

> Make offsets in ByteBufferUtil.* methods relatif to the ByteBuffer position()
> -----------------------------------------------------------------------------
>                 Key: CASSANDRA-1998
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8
>         Attachments: 0001-0.7-Make-BB-offset-relative-to-position.patch, 0001-Make-BB-offset-relative-to-position.patch,
0002-0.7-Move-EMPTY_BYTE_BUFFER-to-ByteBufferUtil.patch, 0002-Move-EMPTY_BYTE_BUFFER-to-ByteBufferUtil.patch
>   Original Estimate: 2h
>  Remaining Estimate: 2h
> A few methods in ByteBufferUtil take as parameter an offset inside a
> ByteBuffer. When we use them, we always want this offset to be relative to
> ByteBuffer.position(), but it is not, it is relative to the ByteBuffer 0
> position. I argue this is not inline with the way we use ByteBuffers and as a
> consequence, is ugly and error-prone.
> This ticket proposes to make the offset of the ByteBufferUtil.* methods
> relatif to the ByteBuffer position.

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

View raw message