org.apache.storm.kafka.bolt.mapper

## Class FieldNameBasedTupleToKafkaMapper<K,V>

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

- All Implemented Interfaces:
    Serializable, TupleToKafkaMapper<K,V>

      public class FieldNameBasedTupleToKafkaMapper<K,V>
      extends Object
      implements TupleToKafkaMapper<K,V>

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `BOLT_KEY`
    `static String` | `BOLT_MESSAGE`
    `String` | `boltKeyField`
    `String` | `boltMessageField`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FieldNameBasedTupleToKafkaMapper()`
    `FieldNameBasedTupleToKafkaMapper(String boltKeyField, String boltMessageField)`

  - ### Method Summary

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

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

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

- - ### Field Detail

    - #### BOLT_KEY

          public static final String BOLT_KEY

      See Also:
        Constant Field Values

    - #### BOLT_MESSAGE

          public static final String BOLT_MESSAGE

      See Also:
        Constant Field Values

    - #### boltKeyField

          public String boltKeyField

    - #### boltMessageField

          public String boltMessageField

  - ### Constructor Detail

    - #### FieldNameBasedTupleToKafkaMapper

          public FieldNameBasedTupleToKafkaMapper()

    - #### FieldNameBasedTupleToKafkaMapper

          public FieldNameBasedTupleToKafkaMapper(String boltKeyField,
                                                  String boltMessageField)

  - ### Method Detail

    - #### getKeyFromTuple

          public K getKeyFromTuple(Tuple tuple)

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

    - #### getMessageFromTuple

          public V getMessageFromTuple(Tuple tuple)

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

Copyright © 2021 The Apache Software Foundation. All rights reserved.