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

Sylvain Lebresne commented on CASSANDRA-4453:
---------------------------------------------

bq. Full package will bloat things a lot for small resultsets.

I note however that this would be only for the thrift transport. The binary 
protocol has short (2 byte) code for all the native types and this patch extend 
it to collections. For this reason I'm a bit reluctant to introduce a whole new 
method. Though as I said above, we can probably just use the short name in the 
existing toString() provided we make sure TypeParser.pase() is fine parsing 
both full and short class names (a quick check says it works just fine).

I think I initially kept long names in toString() only for compatibility with 
old nodes that weren't using TypeParser when decoding types in schema messages. 
However, TypeParser is used since at least 1.0 and besides, we've broken schema 
messages compatibility since then so this likely does not matter anymore.

To sum that up, I think we're fine if we just 
s/getClass().getName()/getClass().getSimpleName()/ in AbstractType.toString().

                
> Better support of collections in the binary protocol
> ----------------------------------------------------
>
>                 Key: CASSANDRA-4453
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4453
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 1.2
>
>         Attachments: 0001-Adds-generics-to-collection-types.txt, 
> 0002-Support-collections-natively-in-the-binary-protocol.txt, 
> 0003-Use-binary-format-for-thrift.txt
>
>
> Currently, collections results are serialized to json string and send that 
> way. This doesn't feel right at all for the binary protocol and we should use 
> a simple binary serialization of the collection instead.
> For the thrift protocol, we might want to keep the json serialization or use 
> the same binary serialization. I don't really have much opinion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to