avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Lewi <jer...@lewi.us>
Subject Make a copy of an avro record
Date Sun, 11 Mar 2012 20:40:46 GMT

In java, I'd like to make a deep copy of an avro record.

Looking at the code that the avro compiler generates it looks like the way
to do this for records of type GraphNodeData
would be
GraphNodeData copy = GraphNodeData.newBuilder(existing_value).build();

where GraphNodeData is the name of my avro record.

Unfortunately, this generates a compile time error because
the method GraphNodeData.build  is decorated with "@Override" but it
apparently does not override any method.
Deleting "@Override" makes the code work. Unfortunately, I would have to do
this every time I regenerated my avro classes from the schema.

Am I doing something wrong or should I file a bug?


View raw message