Jump to content

Kaffffka sparkk streaming hbase


Recommended Posts

Posted
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

panipoori

  • Replies 63
  • Created
  • Last Reply

Top Posters In This Topic

  • vendettaa

    23

  • MuPaGuNa

    7

  • panipoori

    7

  • JollyBoy

    4

Posted
3 minutes ago, panipoori said:

nee daggara answer vndi ga keep changing the value of the variable till the function works

panipoori

ni moham ni moham teliyakapote chup

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...