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
Post a Comment