This project has retired. For details please refer to its Attic page.
AvroSerDe (Apache Crunch 0.9.0 API)

org.apache.crunch.impl.spark.serde
Class AvroSerDe<T>

java.lang.Object
  extended by org.apache.crunch.impl.spark.serde.AvroSerDe<T>
All Implemented Interfaces:
Serializable, SerDe<T>

public class AvroSerDe<T>
extends Object
implements SerDe<T>

See Also:
Serialized Form

Constructor Summary
AvroSerDe(AvroType<T> avroType)
           
 
Method Summary
 T fromBytes(byte[] bytes)
           
 com.google.common.base.Function<byte[],T> fromBytesFunction()
           
 byte[] toBytes(T obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvroSerDe

public AvroSerDe(AvroType<T> avroType)
Method Detail

toBytes

public byte[] toBytes(T obj)
               throws Exception
Specified by:
toBytes in interface SerDe<T>
Throws:
Exception

fromBytes

public T fromBytes(byte[] bytes)
Specified by:
fromBytes in interface SerDe<T>

fromBytesFunction

public com.google.common.base.Function<byte[],T> fromBytesFunction()
Specified by:
fromBytesFunction in interface SerDe<T>


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