incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yang <>
Subject "include" ability in schema file?
Date Tue, 31 May 2011 23:26:11 GMT
I have a protocol schema  hello.avpr

{ ....
types: {
   { name : input_msg ,  type: record : fields [
        { name: date , type int },
       { name :msg, type: string}



now if I need to serialize the record "input_msg", I'm going to need its
so I'd need to pass a schema obj to DataFileWriter. but how can I parse the
schema out from schema file?
the schema for "input_msg" is not a standalone file.

I would like a way to write the type of "input_msg" in a standalone file,
and then reference/include that from my hello.avpr.
is this possible?

also btw, for an avro-generate object class, would it be better to make the
getSchema() method static?
that way I can get its schema without creating an actual obj


View raw message