Annotation Type SerializationToken

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
 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


public abstract int[] tokens


public abstract String[] classNames

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