cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ariel Weisberg (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus
Date Thu, 18 Jun 2015 18:53:01 GMT


Ariel Weisberg commented on CASSANDRA-9499:

I have the proposed encoding implemented and have the beginnings of an efficient implementation
for BufferedDataOutputStreamPlus and NIOInputStream. There is probably still branches or that
could be removed as well as making the bit fiddling more efficient and clearer. I am going
to try and clean it up, but I could use feedback.

I couldn't come up with an efficient implementation for computeUnsignedVIntSize (when you
haven't encoded it yet).
I also created the branch where
I removed Encoded*Stream and changed the serializers to use DataInputPlus which extends DataInput
to add the varint decoding methods. I haven't rebased that on top of C-9499 yet.

I am using 1s for the extension bits. I am also emitting the bytes in little endian order
although it seems like I would need to do that at least for the first byte. I could emit the
rest of the bytes in big endian order for the getLong(). Right now I have to reverse them
because the ByteBuffer is big endian. l am wagering it is faster than swapping the settings.

> Introduce writeVInt method to DataOutputStreamPlus
> --------------------------------------------------
>                 Key: CASSANDRA-9499
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Ariel Weisberg
>            Priority: Minor
>             Fix For: 3.0 beta 1
> CASSANDRA-8099 really could do with a writeVInt method, for both fixing CASSANDRA-9498
but also efficiently encoding timestamp/deletion deltas. It should be possible to make an
especially efficient implementation against BufferedDataOutputStreamPlus.

This message was sent by Atlassian JIRA

View raw message