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