cascading.tuple.hadoop

## Class TupleSerializationProps

- java.lang.Object
- - cascading.property.Props
  - - cascading.tuple.hadoop.TupleSerializationProps

-     public class TupleSerializationProps
      extends Props

  Class TupleSerializationProps is a fluent interface for building properties to be passed to a `FlowConnector` before creating new `Flow` instances.

  See `TupleSerialization` for details on these properties.
  See Also:
    `TupleSerialization`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `HADOOP_IO_SERIALIZATIONS`
    `static java.lang.String` | `IGNORE_TYPES`
    `static java.lang.String` | `REQUIRE_TYPES`
    `static java.lang.String` | `SERIALIZATION_COMPARISON_BITWISE_PREVENT`
    `static java.lang.String` | `SERIALIZATION_TOKENS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TupleSerializationProps()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `TupleSerializationProps` | `addHadoopSerialization(java.lang.String hadoopSerializationClassName)` Method addHadoopSerialization adds a Hadoop serialization className to be used as properties.
    `TupleSerializationProps` | `addHadoopSerializations(java.util.List<java.lang.String> hadoopSerializationClassNames)` Method addHadoopSerializations adds the Hadoop serialization classNames to be used as properties.
    `protected void` | `addPropertiesTo(java.util.Properties properties)`
    `static void` | `addSerialization(java.util.Map<java.lang.Object,java.lang.Object> properties, java.lang.String className)` Adds the given className as a Hadoop IO serialization class.
    `TupleSerializationProps` | `addSerializationToken(int token, java.lang.String serializationClassName)` Method addSerializationToken adds the given integer token and classNames as a serialization properties.
    `static void` | `addSerializationToken(java.util.Map<java.lang.Object,java.lang.Object> properties, int token, java.lang.String className)` Adds the given token and className pair as a serialization token property.
    `TupleSerializationProps` | `addSerializationTokens(java.util.Map<java.lang.Integer,java.lang.String> serializationTokens)` Method addSerializationTokens adds the given integer tokens and classNames Map as a serialization properties.
    `java.util.List<java.lang.String>` | `getHadoopSerializations()`
    `java.lang.Boolean` | `getIgnoreTypes()`
    `boolean` | `getPreventBitWiseComparisons()`
    `java.lang.Boolean` | `getRequireTypes()`
    `java.util.Map<java.lang.Integer,java.lang.String>` | `getSerializationTokens()`
    `static java.lang.String` | `getSerializationTokens(java.util.Map<java.lang.Object,java.lang.Object> properties)` Returns the serialization tokens property.
    `TupleSerializationProps` | `preventBitWiseComparison(boolean preventBitWiseComparisons)` Method preventBitWiseComparison will enable/disable bitwise comparisons of grouping keys during ordered partitioning (`GroupBy` and `CoGroup`).
    `TupleSerializationProps` | `setHadoopSerializations(java.util.List<java.lang.String> hadoopSerializationClassNames)` Method setHadoopSerializations sets the Hadoop serialization classNames to be used as properties.
    `TupleSerializationProps` | `setIgnoreTypes(java.lang.Boolean ignoreTypes)` Method setIgnoreTypes forces the `TupleSerialization` class to ignore any and all declared types causing the serialization to write each type or `SerializationToken` per `Tuple` element.
    `TupleSerializationProps` | `setRequireTypes(java.lang.Boolean requireTypes)` Method setRequireTypes forces `TupleSerialization` to fail if field types are not declared.
    `TupleSerializationProps` | `setSerializationTokens(java.util.Map<java.lang.Integer,java.lang.String> serializationTokens)` Method setSerializationTokens sets the given integer tokens and classNames Map as a serialization properties.
    `static TupleSerializationProps` | `tupleSerializationProps()` Creates a new TupleSerializationProps instance.

    - ### Methods inherited from class cascading.property.Props

      `buildProperties, buildProperties, buildProperties, buildProperties, setProperties, setProperties`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SERIALIZATION_TOKENS

          public static final java.lang.String SERIALIZATION_TOKENS

      See Also:
        Constant Field Values

    - #### SERIALIZATION_COMPARISON_BITWISE_PREVENT

          public static final java.lang.String SERIALIZATION_COMPARISON_BITWISE_PREVENT

      See Also:
        Constant Field Values

    - #### IGNORE_TYPES

          public static final java.lang.String IGNORE_TYPES

      See Also:
        Constant Field Values

    - #### REQUIRE_TYPES

          public static final java.lang.String REQUIRE_TYPES

      See Also:
        Constant Field Values

    - #### HADOOP_IO_SERIALIZATIONS

          public static final java.lang.String HADOOP_IO_SERIALIZATIONS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TupleSerializationProps

          public TupleSerializationProps()

  - ### Method Detail

    - #### addSerializationToken

          public static void addSerializationToken(java.util.Map<java.lang.Object,java.lang.Object> properties,
                                   int token,
                                   java.lang.String className)

      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.
      Parameters:
        `properties` - of type Map
        `token` - of type int
        `className` - of type String

    - #### getSerializationTokens

          public static java.lang.String getSerializationTokens(java.util.Map<java.lang.Object,java.lang.Object> properties)

      Returns the serialization tokens property.
      Parameters:
        `properties` - of type Map
      Returns:
        returns a String

    - #### addSerialization

          public static void addSerialization(java.util.Map<java.lang.Object,java.lang.Object> properties,
                              java.lang.String className)

      Adds the given className as a Hadoop IO serialization class.
      Parameters:
        `properties` - of type Map
        `className` - of type String

    - #### tupleSerializationProps

          public static TupleSerializationProps tupleSerializationProps()

      Creates a new TupleSerializationProps instance.
      Returns:
        TupleSerializationProps instance

    - #### getSerializationTokens

          public java.util.Map<java.lang.Integer,java.lang.String> getSerializationTokens()

    - #### setSerializationTokens

          public TupleSerializationProps setSerializationTokens(java.util.Map<java.lang.Integer,java.lang.String> serializationTokens)

      Method setSerializationTokens sets the given integer tokens and classNames Map as a serialization properties.

      During object serialization and deserialization, the given tokens will be used instead of the className when an instance of the className is encountered.
      Parameters:
        `serializationTokens` - Map of Integer tokens and String classnames
      Returns:
        this

    - #### addSerializationTokens

          public TupleSerializationProps addSerializationTokens(java.util.Map<java.lang.Integer,java.lang.String> serializationTokens)

      Method addSerializationTokens adds the given integer tokens and classNames Map as a serialization properties.

      During object serialization and deserialization, the given tokens will be used instead of the className when an instance of the className is encountered.
      Parameters:
        `serializationTokens` - Map of Integer tokens and String classnames
      Returns:
        this

    - #### addSerializationToken

          public TupleSerializationProps addSerializationToken(int token,
                                                      java.lang.String serializationClassName)

      Method addSerializationToken adds the given integer token and classNames as a serialization properties.

      During object serialization and deserialization, the given tokens will be used instead of the className when an instance of the className is encountered.
      Parameters:
        `token` - type int
        `serializationClassName` - type String
      Returns:
        this

    - #### getHadoopSerializations

          public java.util.List<java.lang.String> getHadoopSerializations()

    - #### setHadoopSerializations

          public TupleSerializationProps setHadoopSerializations(java.util.List<java.lang.String> hadoopSerializationClassNames)

      Method setHadoopSerializations sets the Hadoop serialization classNames to be used as properties.
      Parameters:
        `hadoopSerializationClassNames` - List of classNames
      Returns:
        this

    - #### addHadoopSerializations

          public TupleSerializationProps addHadoopSerializations(java.util.List<java.lang.String> hadoopSerializationClassNames)

      Method addHadoopSerializations adds the Hadoop serialization classNames to be used as properties.
      Parameters:
        `hadoopSerializationClassNames` - List of classNames
      Returns:
        this

    - #### addHadoopSerialization

          public TupleSerializationProps addHadoopSerialization(java.lang.String hadoopSerializationClassName)

      Method addHadoopSerialization adds a Hadoop serialization className to be used as properties.
      Parameters:
        `hadoopSerializationClassName` - List of classNames
      Returns:
        this

    - #### getIgnoreTypes

          public java.lang.Boolean getIgnoreTypes()

    - #### setIgnoreTypes

          public TupleSerializationProps setIgnoreTypes(java.lang.Boolean ignoreTypes)

      Method setIgnoreTypes forces the `TupleSerialization` class to ignore any and all declared types causing the serialization to write each type or `SerializationToken` per `Tuple` element.

      This disables the declared type optimizations.

      See `setRequireTypes(Boolean)` to force a failure if field type information is missing.
      Parameters:
        `ignoreTypes` -
      Returns:

    - #### getRequireTypes

          public java.lang.Boolean getRequireTypes()

    - #### setRequireTypes

          public TupleSerializationProps setRequireTypes(java.lang.Boolean requireTypes)

      Method setRequireTypes forces `TupleSerialization` to fail if field types are not declared.

      This ensures the field type optimizations are leveraged.

      See `setIgnoreTypes(Boolean)` to force field type information to be discarded.
      Parameters:
        `requireTypes` -
      Returns:

    - #### preventBitWiseComparison

          public TupleSerializationProps preventBitWiseComparison(boolean preventBitWiseComparisons)

      Method preventBitWiseComparison will enable/disable bitwise comparisons of grouping keys during ordered partitioning (`GroupBy` and `CoGroup`).

      If natural ordering of grouping/join keys is required, disable bit wise comparisons. They are enabled by default (subject to the below conditions).

      Bit wise comparisons will only apply if the `Fields` used in the grouping/join are declared and no custom `Comparator` instances are provided on the grouping/key Fields, or no secondary sorting is being performed on a GroupBy.
      Parameters:
        `preventBitWiseComparisons` - set to true to disable bit wise comparisons
      Returns:
        this

    - #### getPreventBitWiseComparisons

          public boolean getPreventBitWiseComparisons()

    - #### addPropertiesTo

          protected void addPropertiesTo(java.util.Properties properties)

      Specified by:
        `addPropertiesTo` in class `Props`

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.