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

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -