use of org.apache.storm.kafka.spout.KafkaTuple in project streamline by hortonworks.
the class AvroKafkaSpoutTranslator method apply.
@Override
public List<Object> apply(ConsumerRecord<Object, ByteBuffer> consumerRecord) {
Map<String, Object> keyValues = (Map<String, Object>) deserializer().deserialize(new ByteBufferInputStream(consumerRecord.value()), readerSchemaVersion);
StreamlineEvent streamlineEvent = StreamlineEventImpl.builder().putAll(keyValues).dataSourceId(dataSourceId).build();
KafkaTuple kafkaTuple = new KafkaTuple(streamlineEvent);
kafkaTuple.routedTo(outputStream);
return kafkaTuple;
}
Aggregations