avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shirahatti, Nikhil" <snik...@telenav.com>
Subject Nesting avro with avro or proto binary represenations
Date Thu, 16 Feb 2012 04:23:07 GMT
Hello Avro Users,

My question is whether we can use an avro schema as a wrapper for another avro/protobuf binary
representation.

Example:

{

      "namespace": "com.AvroExample",

      "name": "wrapper",

      "type": "record",

      "fields": [

          {"name": "timestamp", "type": "long"},

          {"name": "header", "type": "string"},

          {"name": "body", "type": "bytes"} ]

}


Then the body can be filled in with the binary representation (avro/protobuf/json). Can we
wrap the below avro schema being inside the above wrapper schema? If so any pointers for it?

{

      "namespace": "com.AvroExample",

      "name": "server",

      "type": "record",

      "fields": [

             { "name" : "status", "type": "string"},

             { "name" : "user", "type": "string"}]

}


Thanks,

Nikhil

Mime
View raw message