[prev in list] [next in list] [prev in thread] [next in thread] 

List:       avro-user
Subject:    Re: Avro Object Clone/Deep Copy
From:       Clément MATHIEU <clement () unportant ! info>
Date:       2015-11-08 22:16:07
Message-ID: 1447020967.2750.4.camel () unportant ! info
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic