This project has retired. For details please refer to its Attic page.
AvroDeepCopier (Apache Crunch 0.3.0-incubating API)

org.apache.crunch.types.avro
Class AvroDeepCopier<T>

java.lang.Object
  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
DeepCopier.NoOpDeepCopier<V>
 
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

AvroDeepCopier

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

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.