Package org.apache.heron.spouts.kafka
Interface ConsumerRecordTransformer<K,V>
-
- Type Parameters:
K
- the type of the key of the Kafka recordV
- the type of the value of the Kafka record
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultConsumerRecordTransformer
public interface ConsumerRecordTransformer<K,V> extends Serializable
This is the transformer class whose responsibility is to:- define the id of the output streams
- declare the list of fields of the output tuple
- translate the incoming Kafka record into the list of values of the output tuple
The default behavior of the built-in transformer will output to stream "default", with 2 fields, "key" and "value" which are the key and value field of the incoming Kafka record.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default List<String>
getFieldNames(String streamId)
default List<String>
getOutputStreams()
default Map<String,List<Object>>
transform(org.apache.kafka.clients.consumer.ConsumerRecord<K,V> record)
-