1.启动pyspark
2.读取文件
1 | >>> from pyspark.sql import SparkSession |
3.退出pyspark使用exit()
4.使用spark-submit提交pyspark任务pi.py
1 | spark2-submit --master local[*] /opt/cloudera/parcels/SPARK2/lib/spark2/examples/src/main/python/pi.py |
1.启动pyspark
2.读取文件
1 | >>> from pyspark.sql import SparkSession |
3.退出pyspark使用exit()
4.使用spark-submit提交pyspark任务pi.py
1 | spark2-submit --master local[*] /opt/cloudera/parcels/SPARK2/lib/spark2/examples/src/main/python/pi.py |