avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ÐΞ€ρ@Ҝ (๏̯͡๏) <deepuj...@gmail.com>
Subject Avro Array and combining schema ?
Date Tue, 21 Jan 2014 14:32:06 GMT
I have two schemas as follow

1) Event.avsc

{

    "type": "record", "namespace":"com.nrt.datum.avro", "name" : "Event",

    "fields": [

            {"name" : "guid", "type": ["string", "null"]},

            {"name" : "moreId", "type": ["int", "null"]}

       ]

}

2. Session.avsc

{

    "type": "record", "namespace":"com.nrt.datum.avro", "name" : "Session",

    "fields": [

             {"name" : "isClosed", "type": "boolean"},

             {"name" : "guid", "type": ["string", "null"]}

 ]

}


1) I want to define a third schema that should SessionContainer, that
should have all the fields of schema and an array (List) of Event. How do i
write SessionContainer.avsc  ?
2) If i could refer Event.avsc and Session.avsc in SessionContainer.avsc
then if i change Event/Session, i do not have to change SessionContainer.

I use Java + Avro.
Any suggestions ?

-- 
Deepak

Mime
View raw message