Class BytesSerialization

  extended by org.apache.hadoop.conf.Configured
      extended by cascading.tuple.hadoop.BytesSerialization
All Implemented Interfaces:
Comparison<byte[]>, Configurable, Serialization<byte[]>

public class BytesSerialization
extends Configured
implements Comparison<byte[]>, Serialization<byte[]>

Class BytesSerialization is an implementation of Hadoop's Serialization interface for use by byte arrays (byte[]).

To use, call
TupleSerialization.addSerialization(properties,BytesSerialization.class.getName() );

This class also implements Comparison so it is not required to set a BytesComparator when attempting to group on a byte array via GroupBy or CoGroup.

See Also:
BytesComparator, Comparison

Nested Class Summary
static class BytesSerialization.RawBytesDeserializer
static class BytesSerialization.RawBytesSerializer
Constructor Summary
Method Summary
 boolean accept(Class<?> c)
 Comparator<byte[]> getComparator(Class<byte[]> type)
 Deserializer<byte[]> getDeserializer(Class<byte[]> c)
 Serializer<byte[]> getSerializer(Class<byte[]> c)
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public BytesSerialization()
Method Detail


public boolean accept(Class<?> c)
Specified by:
accept in interface Serialization<byte[]>


public Serializer<byte[]> getSerializer(Class<byte[]> c)
Specified by:
getSerializer in interface Serialization<byte[]>


public Deserializer<byte[]> getDeserializer(Class<byte[]> c)
Specified by:
getDeserializer in interface Serialization<byte[]>


public Comparator<byte[]> getComparator(Class<byte[]> type)
Specified by:
getComparator in interface Comparison<byte[]>

Copyright © 2007-2010 Concurrent, Inc. All Rights Reserved.