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
  `final String`
  `keyFieldName`
  `final String`
  `msgFieldName`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FieldNameBasedTupleToKafkaMapper(String keyFieldName, String msgFieldName)`

- ## Method Summary

  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 Details

  - ### keyFieldName

    public final String keyFieldName

  - ### msgFieldName

    public final String msgFieldName

- ## Constructor Details

  - ### FieldNameBasedTupleToKafkaMapper

    public FieldNameBasedTupleToKafkaMapper(String keyFieldName, String msgFieldName)

- ## Method Details

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