cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renato Marroquín Mogrovejo <renatoj.marroq...@gmail.com>
Subject Re: Cassandra supported Avro data types
Date Thu, 03 Jan 2013 22:35:56 GMT
Thanks Aaron!

What I am trying to map into Cassandra is an avro model like the one
that follows:


{
  "type": "record",
  "name": "WebPage",
  "namespace": "org.bytegolem.webpage.generated",
  "fields" : [
    {"name": "url", "type": "string"},
    {"name": "content", "type": ["null","bytes"]}]
}

But I am not sure on how to map the {"name": "content", "type":
["null","bytes"]} part. Should I just use it just as a column
accepting null values?
This is what I've got:

keyspace ="WebPage"
- Family "p"
 > Field name="url" qualifier="c:u"
 > Field name="content" qualifier="p:cnt:c"

Would that sound right to you? Any advice is appreciated!
Thanks!


Renato M.


2013/1/3 aaron morton <aaron@thelastpickle.com>:
>  I am not sure which
> Avro data types Cassandra support
>
> None.
> Any mention to avro internally is from a dark time in the past.
>
> Cassandra presents it's own data model, which can be used to store pretty
> much anything. So you could serialise the avro types and store them as byte
> streams if you wanted to.
>
> Hope that helps.
>
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 4/01/2013, at 7:22 AM, Renato Marroquín Mogrovejo
> <renatoj.marroquin@gmail.com> wrote:
>
> Hi all,
>
> I have started playing around with Cassandra and I am not sure which
> Avro data types Cassandra supports. Is there any type of documentation
> or could anyone please help me on this doubt of mine?
> Thanks!
>
>
> Renato M.
>
>

Mime
View raw message