panipoori Posted January 3, 2019 Report Posted January 3, 2019 3 minutes ago, vendettaa said: val messages = KafkaUtils.createDirectStream[String, String]( ssc, LocationStrategies.PreferConsistent, ConsumerStrategies.Subscribe[String, String](topicsSet, kafkaParams)) val lines = messages.map(_.value) import sqlContext.implicits._ lines.foreachRDD(rdd => rdd.foreach(println)) println("44444444444444444") lines.foreachRDD(raw=>{ val xy = raw.map(_.value.toString) val df =sqlContext.read.json(xy) }) ikda Error:(148, 27) value value is not a member of String val xy = raw.map(_.value.toString) 😫😫 nee daggara answer vndi ga keep changing the value of the variable till the function works Quote
vendettaa Posted January 3, 2019 Author Report Posted January 3, 2019 3 minutes ago, panipoori said: nee daggara answer vndi ga keep changing the value of the variable till the function works ni moham ni moham teliyakapote chup Quote
panipoori Posted January 3, 2019 Report Posted January 3, 2019 39 minutes ago, vendettaa said: ni moham ni moham teliyakapote chup Quote
vendettaa Posted January 3, 2019 Author Report Posted January 3, 2019 Finally cracked it but I have to upgrade version Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.