avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clément MATHIEU <clem...@unportant.info>
Subject Re: Avro Object Clone/Deep Copy
Date Sun, 08 Nov 2015 22:16:07 GMT
On Thu, 2015-11-05 at 12:00 -0600, Rushi wrote:

Hi,

> Is there a way to clone an avro object if it's type is not known at
> compile time?
>
> [...]
>
> I could use reflection to do this, but wanted to see if there exists
> a way to do this using Avro API.

GenericData.deepCopy() seems to be what you are looking for.

See: http://avro.apache.org/docs/1.7.7/api/java/org/apache/avro/generic
/GenericData.html#deepCopy%28org.apache.avro.Schema,%20T%29


Clément MATHIEU

Mime
View raw message