I wrote a pyspark hello world python script:
from pyspark import SparkContext
from operator import add
sc = SparkContext()
data = sc.parallelize(list("Hello World"))
counts = data.map(lambda x: (x, 1)).reduceByKey(add).sortBy(lambda x: x[1], ascending=False).collect()
for (word, count) in counts:
print("{}: {}".format(word, count))
sc.stop()
And I wrote a sh file to run the pyspark code:
/home/ubuntu/spark/bin/spark-submit --master local[8] --driver-memory 12g --executor-memory 12g helloworld.py
And I run it. Got the results:
Toto locations where you can use Sports Toto Security are selected by site experts based on a comparison of capabilities, security, and features. We recommend the use of Private Toto in parks where there is strong evidence. 토토사이트 this website 안전놀이터
ReplyDelete