spark shell的运行模式汇总

scala语言

模式 启动命令  
local模式 spark-shell --master local  
yarn模式 spark-shell --master yarn  
standalone-client模式

①spark-shell

②spark-shell local

③spark-shell --master spark://master:7077

 
standalone-cluster模式 spark-shell  --master yarn --deploy-mode  cluster

官方不支持,若强行启动会报错:

Cluster deploy mode is not applicable to Spark shells

解释下上面的spark-shell local为啥是standalone-client模式,

这是因为启动后会告诉你,你的master是啥

----------------------------------------------------------------------------------------------------------------------------------------------------------------

pyspark

模式 启动命令
local模式 pyspark --master local
yarn模式 pyspark --master yarn
standalone-client模式

①pyspark

②pyspark --master spark://master:7077

猜你喜欢

转载自blog.csdn.net/appleyuchi/article/details/107642339