Class AvroDeepCopier<T>

  extended by org.apache.crunch.types.avro.AvroDeepCopier<T>
All Implemented Interfaces:
Serializable, DeepCopier<T>
Direct Known Subclasses:
AvroDeepCopier.AvroGenericDeepCopier, AvroDeepCopier.AvroReflectDeepCopier, AvroDeepCopier.AvroSpecificDeepCopier

public abstract class AvroDeepCopier<T>
extends Object
implements DeepCopier<T>, Serializable

Performs deep copies of Avro-serializable objects.

Warning: Methods in this class are not thread-safe. This shouldn't be a problem when running in a map-reduce context where each mapper/reducer is running in its own JVM, but it may well be a problem in any other kind of multi-threaded context.

See Also:
Serialized Form

Nested Class Summary
static class AvroDeepCopier.AvroGenericDeepCopier
          Deep copier for Avro generic data objects.
static class AvroDeepCopier.AvroReflectDeepCopier<T>
          Deep copier for Avro reflect data objects.
static class AvroDeepCopier.AvroSpecificDeepCopier<T>
          Deep copier for Avro specific data objects.
static class AvroDeepCopier.AvroTupleDeepCopier
Nested classes/interfaces inherited from interface org.apache.crunch.types.DeepCopier
Constructor Summary
AvroDeepCopier(org.apache.avro.Schema schema)
Method Summary
 T deepCopy(T source)
          Create a deep copy of an Avro value.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public AvroDeepCopier(org.apache.avro.Schema schema)
Method Detail


public T deepCopy(T source)
Create a deep copy of an Avro value.

Specified by:
deepCopy in interface DeepCopier<T>
source - The value to be copied
The deep copy of the value

Copyright © 2012 The Apache Software Foundation. All Rights Reserved.