Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## cascading.tuple.hadoop
Annotation Type SerializationToken

    @Retention(value=RUNTIME)
    @Target(value=TYPE)
    public @interface SerializationToken

Annotation SerializationToken enables `TupleInputStream` and `TupleOutputStream` to substitute Integer values for a class name when writing out nested objects inside a `Tuple`.

To use, add this annotation to any custom Hadoop `Serialization` implementation.

For example:

     @SerializationToken(tokens={222, 223}, classNames = {"example.PersonObject", "example.SiteObject"})
     public class MySerialization implements org.apache.hadoop.io.serializer.Serialization
     {
     public MySerialization()
     {
     ...
     }
     ...
     }

The SerializationToken annotation allows for multiple token to className mappings, since a Serialization implementation may `Serialization.accept(Class)` more than one class.

Note that the token integer value must be 128 or greater to save room for internal types.

See Also:
  `TupleInputStream`, `TupleOutputStream`, `TupleSerialization`

Required Element Summary
`String[]` | `classNames`
`int[]` | `tokens`

Element Detail

### tokens

    public abstract int[] tokens

### classNames

    public abstract String[] classNames

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

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