How to get Kafka Topic Name from Spark Streaming createStream API -


i using spark streaming 1.6.1 , kafka 0.9.0.1 on hdp 2.4.1, due open open bug in hdp 2.4.2 not able use createdirectstream api spark streaming,so using createstream api spark streaming. have requirement need topic name dstream on basis of topic name need processing. using below code read message kafka topic, not able retrieve topic name dstream coming null. can please me on this.

val record = kafkautils.createstream[string, string, stringdecoder, stringdecoder](ssc, kafkaparams, topicmap, storagelevel.memory_only_ser_2) val keys =record.map(_._1) keys.print 


Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -