Re: Parsing Avro from Kafka Message

2015-09-04 Thread Akhil Das
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 <

Re: Parsing Avro from Kafka Message

2015-09-04 Thread Daniel Haviv
This will create and RDD[String] and what I want is a DF based on the avro schema. Thank you Akhil. Sent from my iPhone > On 4 בספט׳ 2015, at 15:05, Akhil Das wrote: > > Something like this? > > val avroStream =

Parsing Avro from Kafka Message

2015-09-03 Thread Daniel Haviv
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