Package org.apache.storm.kafka.trident.mapper

## Class FieldNameBasedTupleToKafkaMapper<K,​V>

- java.lang.Object
- - org.apache.storm.kafka.trident.mapper.FieldNameBasedTupleToKafkaMapper<K,​V>

- All Implemented Interfaces:
    `Serializable`, `TridentTupleToKafkaMapper`

      public class FieldNameBasedTupleToKafkaMapper<K,​V>
      extends Object
      implements TridentTupleToKafkaMapper

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `String` | `keyFieldName` |
    `String` | `msgFieldName` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FieldNameBasedTupleToKafkaMapper​(String keyFieldName, String msgFieldName)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `K` | `getKeyFromTuple​(TridentTuple tuple)` |
    `V` | `getMessageFromTuple​(TridentTuple tuple)` |

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

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

- - ### Field Detail

    - #### keyFieldName

          public final String keyFieldName

    - #### msgFieldName

          public final String msgFieldName

  - ### Constructor Detail

    - #### FieldNameBasedTupleToKafkaMapper

          public FieldNameBasedTupleToKafkaMapper​(String keyFieldName,
                                                  String msgFieldName)

  - ### Method Detail

    - #### getKeyFromTuple

          public K getKeyFromTuple​(TridentTuple tuple)

      Specified by:
        `getKeyFromTuple` in interface `TridentTupleToKafkaMapper<K,​V>`

    - #### getMessageFromTuple

          public V getMessageFromTuple​(TridentTuple tuple)

      Specified by:
        `getMessageFromTuple` in interface `TridentTupleToKafkaMapper<K,​V>`