How to covert ReceiveInputDstream to DataFrame in spark using scala

apache-spark

#1

Hi All,

i am streaming the data from RabbitMq that return the Json String as ReceiverInputDStream. I need to convert it into DataFrame how i can do that? below code
receiverStream return as ReceiverInputDStream that contain json string.

val receiverStream = RabbitMQUtils.createStream(ssc, Map(
“hosts” -> host,
“port” -> port,
“queueName” -> queueName,
“vHost” -> vHost,
“userName” -> userName,
“password” -> password
))