org.apache.crunch.types.avro
Class AvroDeepCopier<T>
java.lang.Object
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
Method Summary |
T |
deepCopy(T source)
Create a deep copy of an Avro value. |
AvroDeepCopier
public AvroDeepCopier(org.apache.avro.Schema schema)
deepCopy
public T deepCopy(T source)
- Create a deep copy of an Avro value.
- Specified by:
deepCopy
in interface DeepCopier<T>
- Parameters:
source
- The value to be copied
- Returns:
- The deep copy of the value
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.