spark的examples运行

spark的examples运行:

spark1.4.1


1. spark-submit:

hadoop@Master:~/cloud/spark-1.4.1$ spark-submit --master local examples/src/main/python/pi.py 10
Pi is roughly 3.142524                                                          
hadoop@Master:~/cloud/spark-1.4.1$ spark-submit --master local examples/src/main/python/pi.py 1000
Pi is roughly 3.141667  


2. ./bin/run-example:

xubo@xubo:~/cloud/spark-1.4.1$ ./bin/run-example org.apache.spark.examples.SparkPi 
Pi is roughly 3.1449                                                            
xubo@xubo:~/cloud/spark-1.4.1$ ./bin/run-example org.apache.spark.examples.SparkPi 100
Pi is roughly 3.1423152

你可能感兴趣的:(spark)