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

Is there a better way to structure post methods in Class Based Views -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -