org.apache.storm.kafka.spout.trident

## Class TopicPartitionSerializer

- java.lang.Object
- - org.apache.storm.kafka.spout.trident.TopicPartitionSerializer

-     public class TopicPartitionSerializer
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `TOPIC_PARTITION_PARTITION_KEY`
    `static String` | `TOPIC_PARTITION_TOPIC_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TopicPartitionSerializer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.kafka.common.TopicPartition` | `fromMap(Map<String,Object> map)` Deserializes the given map into a TopicPartition.
    `Map<String,Object>` | `toMap(org.apache.kafka.common.TopicPartition topicPartition)` Serializes the given TopicPartition to Map so Trident can serialize it to JSON.

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

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

- - ### Field Detail

    - #### TOPIC_PARTITION_TOPIC_KEY

          public static final String TOPIC_PARTITION_TOPIC_KEY

      See Also:
        Constant Field Values

    - #### TOPIC_PARTITION_PARTITION_KEY

          public static final String TOPIC_PARTITION_PARTITION_KEY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TopicPartitionSerializer

          public TopicPartitionSerializer()

  - ### Method Detail

    - #### toMap

          public Map<String,Object> toMap(org.apache.kafka.common.TopicPartition topicPartition)

      Serializes the given TopicPartition to Map so Trident can serialize it to JSON.

    - #### fromMap

          public org.apache.kafka.common.TopicPartition fromMap(Map<String,Object> map)

      Deserializes the given map into a TopicPartition. The map keys are expected to be those produced by `toMap(org.apache.kafka.common.TopicPartition)`.

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