Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cascading.tuple.hadoop
Class TupleSerialization

    java.lang.Object
      org.apache.hadoop.conf.Configured
          cascading.tuple.hadoop.TupleSerialization

All Implemented Interfaces:
  Configurable, Serialization

    public class TupleSerialization

extends Configured
implements Serialization

Class TupleSerialization is an implementation of Hadoop's `Serialization` interface.

Typically developers will not use this implementation directly as it is automatically added to any relevant MapReduce jobs via the `JobConf`.

By default, all primitive types are natively handled, and `BytesWritable` has a pre-configured serialization token since byte arrays are not handled natively by `Tuple`.

To add or manipulate Hadoop serializations or Cascading serializations tokens, see `TupleSerializationProps` for a fluent property builder class.

By default this Serialization interface registers the class `ByteWritable` as token 127.

Nested Class Summary
`static class` | `TupleSerialization.SerializationElementReader`
`static class` | `TupleSerialization.SerializationElementWriter`

Constructor Summary
`TupleSerialization()` Constructor TupleSerialization creates a new TupleSerialization instance.
`TupleSerialization(Configuration conf)` Constructor TupleSerialization creates a new TupleSerialization instance.
`TupleSerialization(FlowProcess<JobConf> flowProcess)`

Method Summary
`boolean` | `accept(Class c)` Method accept implements `Serialization.accept(Class)`.
`static void` | `addSerialization(Map<Object,Object> properties, String className)` Deprecated.
`static void` | `addSerializationToken(Map<Object,Object> properties, int token, String className)` Deprecated.
`Class` | `getClass(String className)`
`Comparator` | `getComparator(Class type)`
`Configuration` | `getConf()`
`Comparator` | `getDefaultComparator()`
`static Comparator` | `getDefaultComparator(Comparator comparator, Configuration jobConf)`
`static Comparator` | `getDefaultComparator(Configuration jobConf)`
`Deserializer` | `getDeserializer(Class c)` Method getDeserializer implements `Serialization.getDeserializer(Class)`.
`TupleSerialization.SerializationElementReader` | `getElementReader()` Method getElementReader returns the elementReader of this TupleSerialization object.
`TupleSerialization.SerializationElementWriter` | `getElementWriter()` Method getElementWriter returns the elementWriter of this TupleSerialization object.
`static String` | `getSerializationTokens(Map<Object,Object> properties)` Deprecated.
`Serializer` | `getSerializer(Class c)` Method getSerializer implements `Serialization.getSerializer(Class)`.
`void` | `setConf(Configuration conf)`
`static void` | `setSerializations(JobConf jobConf)` Adds this class as a Hadoop Serialization class.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TupleSerialization

    public TupleSerialization()

  Constructor TupleSerialization creates a new TupleSerialization instance.

### TupleSerialization

    public TupleSerialization(FlowProcess<JobConf> flowProcess)

### TupleSerialization

    public TupleSerialization(Configuration conf)

  Constructor TupleSerialization creates a new TupleSerialization instance.

  Parameters:
    `conf` - of type Configuration

Method Detail

### addSerializationToken

    @Deprecated
    public static void addSerializationToken(Map<Object,Object> properties,
                                                        int token,
                                                        String className)

  Deprecated.

  Adds the given token and className pair as a serialization token property. During object serialization and deserialization, the given token will be used instead of the className when an instance of the className is encountered.

  This method has moved to `TupleSerializationProps.addSerializationToken(java.util.Map, int, String)`.

  Parameters:
    `properties` - of type Map
    `token` - of type int
    `className` - of type String

### getSerializationTokens

    @Deprecated
    public static String getSerializationTokens(Map<Object,Object> properties)

  Deprecated.

  Returns the serialization tokens property.

  This method has moved to `TupleSerializationProps.getSerializationTokens(java.util.Map)`.

  Parameters:
    `properties` - of type Map
  Returns:
    returns a String

### addSerialization

    @Deprecated
    public static void addSerialization(Map<Object,Object> properties,
                                                   String className)

  Deprecated.

  Adds the given className as a Hadoop IO serialization class.

  This method has moved to `TupleSerializationProps.addSerialization(java.util.Map, String)`.

  Parameters:
    `properties` - of type Map
    `className` - of type String

### setSerializations

    public static void setSerializations(JobConf jobConf)

  Adds this class as a Hadoop Serialization class. This method is safe to call redundantly.

  This method will guarantee `TupleSerialization` and `WritableSerialization` are first in the list, as both are required.

  Parameters:
    `jobConf` - of type JobConf

### getDefaultComparator

    public static Comparator getDefaultComparator(Comparator comparator,
                                                  Configuration jobConf)

### getDefaultComparator

    public static Comparator getDefaultComparator(Configuration jobConf)

### setConf

    public void setConf(Configuration conf)

  Specified by:
    `setConf` in interface `Configurable`
  Overrides:
    `setConf` in class `Configured`

### getConf

    public Configuration getConf()

  Specified by:
    `getConf` in interface `Configurable`
  Overrides:
    `getConf` in class `Configured`

### getDefaultComparator

    public Comparator getDefaultComparator()

### getComparator

    public Comparator getComparator(Class type)

### getElementReader

    public TupleSerialization.SerializationElementReader getElementReader()

  Method getElementReader returns the elementReader of this TupleSerialization object.

  Returns:
    the elementReader (type SerializationElementReader) of this TupleSerialization object.

### getElementWriter

    public TupleSerialization.SerializationElementWriter getElementWriter()

  Method getElementWriter returns the elementWriter of this TupleSerialization object.

  Returns:
    the elementWriter (type SerializationElementWriter) of this TupleSerialization object.

### accept

    public boolean accept(Class c)

  Method accept implements `Serialization.accept(Class)`.

  Specified by:
    `accept` in interface `Serialization`
  Parameters:
    `c` - of type Class
  Returns:
    boolean

### getDeserializer

    public Deserializer getDeserializer(Class c)

  Method getDeserializer implements `Serialization.getDeserializer(Class)`.

  Specified by:
    `getDeserializer` in interface `Serialization`
  Parameters:
    `c` - of type Class
  Returns:
    Deserializer

### getSerializer

    public Serializer getSerializer(Class c)

  Method getSerializer implements `Serialization.getSerializer(Class)`.

  Specified by:
    `getSerializer` in interface `Serialization`
  Parameters:
    `c` - of type Class
  Returns:
    Serializer

### getClass

    public Class getClass(String className)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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