Something like this?

    val avroStream = KafkaUtils.createDirectStream[AvroKey[GenericRecord],
NullWritable, AvroKeyInputFormat[GenericRecord]](..)

    val avroData = avroStream.map(x => x._1.datum().toString)


Thanks
Best Regards

On Thu, Sep 3, 2015 at 6:17 PM, Daniel Haviv <
[email protected]> wrote:

> Hi,
> I'm reading messages from Kafka where the value is an avro file.
> I would like to parse the contents of the message and work with it as a
> DataFrame, like with the spark-avro package but instead of files, pass it a
> RDD.
>
> How can this be achieved ?
>
> Thank you.
> Daniel
>
>

Reply via email to