- 启动Master
sbin/start-master.sh
- 启动spark-shell
bin/spark-shell
- 启动Worker
sbin/start-slave.sh spark://master的主机名:7077
- local模式运行任务
bin/spark-submit --master local[4] --class WorldCount /mnt/e/repository/com/baidu/wge/spark-learn/1.0-SNAPSHOT/spark-learn-1.0-SNAPSHOT.jar
- 伪分布式运行任务
bin/spark-submit --class org.apache.spark.examples.SparkPi --master spark://liuzuwei:7077 examples/jars/spark-examples_2.11-2.4.0.jar
网友评论