cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-9499) Introduce writeVInt method to DataOutputStreamPlus
Date Wed, 24 Jun 2015 15:06:05 GMT

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

Benedict edited comment on CASSANDRA-9499 at 6/24/15 3:05 PM:
--------------------------------------------------------------

Obviously this is out-of-scope, but the only real problem a stream solves is ensuring there
is always enough room. That and being easily passed to JDK tools, and supporting functionality
like vint encoding. However we could certainly explore a "lightweight stream" API that exposes
the BB and just has ensureRemaining() exposed (plus WritableByteChannel methods for calls
that may be too large for a buffer). vint coding can be done via static method calls. *if*
it's workable, I would be strongly in favour of this, as right now the method invocation costs
for writing/reading streams are really significant. It isn't a small undertaking, though.
But nor is it that huge. 

It is definitely something we should explore, to see how viable it is. In a follow-up ticket,
of course :)


was (Author: benedict):
Obviously this is out-of-scope, but the only real problem a stream solves is ensuring there
is always enough room. That and being easily passed to JDK tools, and supporting functionality
like vint encoding. However we could certainly explore a "lightweight stream" API that exposes
the BB and just has ensureRemaining() exposed. vint coding can be done via static method calls.
*if* it's workable, I would be strongly in favour of this, as right now the method invocation
costs for writing/reading streams are really significant. It isn't a small undertaking, though.
But nor is it that huge. 

It is definitely something we should explore, to see how viable it is. In a follow-up ticket,
of course :)

> Introduce writeVInt method to DataOutputStreamPlus
> --------------------------------------------------
>
>                 Key: CASSANDRA-9499
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9499
>             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
(v6.3.4#6332)

Mime
View raw message