public class TopicPartitionSerializer extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
TOPIC_PARTITION_PARTITION_KEY |
static String |
TOPIC_PARTITION_TOPIC_KEY |
| Constructor and Description |
|---|
TopicPartitionSerializer() |
| 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.
|
public static final String TOPIC_PARTITION_TOPIC_KEY
public static final String TOPIC_PARTITION_PARTITION_KEY
public Map<String,Object> toMap(org.apache.kafka.common.TopicPartition topicPartition)
Serializes the given TopicPartition to Map so Trident can serialize it to JSON.
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.