启动交互shell
在bin路径下启动./spark-shell --master spark://hdp1:7077 --executor-memory 500m --total-executor-cores 1
--master spark://hdp1:7077 sparkmaster节点的地址
--executor-memory 500m
--total-executor-cores 1
提交到yarn集群上运行
spark-shell --master yarn --deploy-mode client