cassandra-client-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Molinaro <antho...@alumni.caltech.edu>
Subject Re: Erlang Thrift generator broken?
Date Mon, 19 Dec 2011 18:11:44 GMT
This sort of question should probably be sent to the thrift development list but I can answer
here that the thrift generator should probably generate a different spec (binaries are returned
as that is what comes through in the packets and the thrift library does not process them).
 Please file a bug report against the thrift project JIRA.

Thanks

-Anthony

On Dec 18, 2011, at 5:01 PM, Roberto Ostinelli <roberto@widetag.com> wrote:

> Dear list,
> 
> I'm building an Erlang CQL client for Cassandra. I'm using Thrift version 0.8.0, and
Cassandra 1.0.5. I've generated the Erlang Thrift code with the command:
> thrift --gen erl cassandra/interface/cassandra.thrift
> 
> One of the generate files, cassandra_types.hrl, seems to have incorrect record definitions.
To be more precise:
> 
> -record(cqlMetadata, {name_types = dict:new() :: dict(), 
>                      value_types = dict:new() :: dict(), 
>                      default_name_type = undefined :: string(),
>                      default_value_type = undefined :: string()}).
> 
> 
> -record(column, {name = undefined :: string(),
>        value = undefined :: string(), 
>                 timestamp = undefined :: integer(), 
>                 ttl = undefined :: integer()}).
> 
> For instance, these two records specify string() in name and value columns, but the real
returned values from Cassandra are binary(). Haven't tested it yet, but everytime there's
a string() specification in this file, it really seems that it should be binary(), which is
what thrift calls return from Cassandra.
> 
> Is this the appropriate list where I should report this, or should I do so in some other
list dedicated to API development?
> 
> Thank you,
> 
> r.

Mime
View raw message