avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ÐΞ€ρ@Ҝ (๏̯͡๏) <deepuj...@gmail.com>
Subject Re: Avro Array and combining schema ?
Date Tue, 21 Jan 2014 15:15:51 GMT
+dev list.


On Tue, Jan 21, 2014 at 8:02 PM, ÐΞ€ρ@Ҝ (๏̯͡๏) <deepujain@gmail.com> wrote:

> 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
>
>


-- 
Deepak

Mime
View raw message