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

org.apache.crunch.impl.spark.serde
Class WritableSerDe

java.lang.Object
  extended by org.apache.crunch.impl.spark.serde.WritableSerDe
All Implemented Interfaces:
Serializable, SerDe<org.apache.hadoop.io.Writable>

public class WritableSerDe
extends Object
implements SerDe<org.apache.hadoop.io.Writable>

See Also:
Serialized Form

Constructor Summary
WritableSerDe(Class<? extends org.apache.hadoop.io.Writable> clazz)
           
 
Method Summary
 org.apache.hadoop.io.Writable fromBytes(byte[] bytes)
           
 com.google.common.base.Function<byte[],org.apache.hadoop.io.Writable> fromBytesFunction()
           
 byte[] toBytes(org.apache.hadoop.io.Writable obj)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WritableSerDe

public WritableSerDe(Class<? extends org.apache.hadoop.io.Writable> clazz)
Method Detail

toBytes

public byte[] toBytes(org.apache.hadoop.io.Writable obj)
               throws Exception
Specified by:
toBytes in interface SerDe<org.apache.hadoop.io.Writable>
Throws:
Exception

fromBytes

public org.apache.hadoop.io.Writable fromBytes(byte[] bytes)
Specified by:
fromBytes in interface SerDe<org.apache.hadoop.io.Writable>

fromBytesFunction

public com.google.common.base.Function<byte[],org.apache.hadoop.io.Writable> fromBytesFunction()
Specified by:
fromBytesFunction in interface SerDe<org.apache.hadoop.io.Writable>


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