Can someone tell me the code for creating a dataframe in pyspark in python 2.6 and spark 2.0 -


sc = sparkcontext(appname="pythonsparkstreamingkafka_rm_01")
ssc = streamingcontext(sc, 120)

kafkastream = kafkautils.createstream(ssc, '112.10.1.1:2181', 'kafka-spark-streaming', {'kafkatopic':1})

after executing above code , need have code creating dataframe in pyspark


Comments

Popular posts from this blog

angular - DownloadURL return null in below code -

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -